I have a joomla website and when I am trying to update a larger
extension I
get bad gateway (502) error.
I am able to update all small (normal) extensions.
I am getting this error in nginx error log: “upstream sent invalid
status
“-1 Copy failed” while reading response header from upstream”
I have checked the php-fpm log and there is nothing there connected to
this
particular error(I have it enabled in config).
All files and folders have www-data owner and proper permissions (I even
tried with 777).
There are parts of nginx.conf that I tried editing to fix this issue but
it
didn’t work:
pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ .php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
# NOTE: You should have “cgi.fix_pathinfo = 0;” in php.ini
# With php5-cgi alone:
#fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
I have tried searching this problem everywhere and tried many suggested
fixes but I am unable to fix this issue.
Interesting problem is that I think its connected to the file size which
I
am trying to update (its around 3MB only still but bigger than all
successfully updated extensions). The file (tar.gz gets updated
successfully
I think but after its being extracted or updated the error jumps)
Hello, thank you for help.
Yes I have already tried that. (tried putting it to client_max_body_size
20M;)
My php post_max_size and max_upload_filesize are = 20M (for the sake of
fixing this problem)
On Sat, Oct 25, 2014 at 09:21:49PM -0400, NaZz wrote:
I have a joomla website and when I am trying to update a larger extension I
get bad gateway (502) error.
I am able to update all small (normal) extensions.
I am getting this error in nginx error log: “upstream sent invalid status
“-1 Copy failed” while reading response header from upstream”
The message suggests your upstream server returned an invalid
response, with “-1 Copy failed” in it instead of a valid HTTP
status. You have to dig into your upstream server to find out
what goes on there.
Where should I dig exactly? I am using Nginx with PHP-FPM and I have
checked
the logs but I can’t find anything. Where do I dig? I thought this is
connected to Nginx configuration?
On Mon, Oct 27, 2014 at 04:44:25PM -0400, NaZz wrote:
Where should I dig exactly? I am using Nginx with PHP-FPM and I have checked
the logs but I can’t find anything. Where do I dig? I thought this is
connected to Nginx configuration?
From nginx point of view, “your upstream server” is exact thing
to dig into. Anything more specific is beyond the scope of this
list.
Most likely, the problem is in the PHP code on the upstream
server, as I don’t think that PHP itself would return such invalid
response for any reason. But see above, it’s unrelated to nginx
and beyond the scope of this list.
If its unrelated to nginx why are people suggesting to edit various
settings in nginx.conf to fix this particular problem?
You can only do so much with config, the real problem here is the
upstream
(=backend).
nginx talks English <> your backend talks Russian
Somewhere your backend started talking a Russian dialect nginx don’t
understand, hence the need to fix your backend.
The hint " upstream sent invalid status " should say enough.
I don’t understand this “upstream” “upstream” “upstream backend server”.
The upstream is served by fastcgi - fpm.sock on my own server. How do I
attend this problem?
Where do I dig exactly?
I don’t understand this “upstream” “upstream” “upstream backend server”.
The upstream is served by fastcgi - fpm.sock on my own server. How do I
attend this problem?
Where do I dig exactly?
PHP or its FastCGI/FPM interface.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.