Answer the question
In order to leave comments, you need to log in
How to defeat Nginx "upstream closed prematurely" error?
In the NGINX error logs I get:
upstream sent too big header while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: domain.ru, request: "POST /....../......./ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: ".........", referrer: "................"
server {
listen 80;
server_name domain.ru www.domain.ru;
root /home/www/docs/domain.ru;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
index index.php index.html index.htm;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
proxy_buffers 8 16k;
proxy_buffer_size 32k;
}
Answer the question
In order to leave comments, you need to log in
Because it needs to be
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
http
instead ofserver
Replacing unix:/var/run/php5-fpm.sock with 127.0.0.1:9000 doesn't help?
At least there it will be possible to listen with a sniffer.
Maybe PHP really produces an incorrect answer.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question