1. 程式人生 > >NGINX 反向代理錯誤:104: Connection reset by peer

NGINX 反向代理錯誤:104: Connection reset by peer

轉: https://my.oschina.net/u/1024107/blog/1838968

此問題在於 nginx的buffer太小,timeout太小。

http模組新增以下引數配置:

client_body_buffer_size 20m;

fastcgi_buffer_size 128k;

fastcgi_buffers 4 128k;

fastcgi_busy_buffers_size 256k;

gzip_buffers 16 8k;

proxy_buffer_size 64k;

proxy_buffers 4 128k;

proxy_busy_buffers_size 256k;

keepalive_timeout 240;

fastcgi_connect_timeout 600;

fastcgi_send_timeout 600;

fastcgi_read_timeout 600;

proxy_connect_timeout 600;

proxy_send_timeout 1200;

proxy_read_timeout 1200;