nginxのエラーログに「upstream sent too big header while reading response header from upstream」の出力があった場合の対応方法
「レスポンスヘッダーが大きすぎる」ということでエラーになっています。
nginx.confに以下を追加します。
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# cat nginx.conf user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; include /usr/share/nginx/modules/*.conf; events { worker_connections 1024; } http { server_tokens off; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; fastcgi_buffers 8 16k; fastcgi_buffer_size 32k; include /etc/nginx/mime.types; default_type application/octet-stream; # Load modular configuration files from the /etc/nginx/conf.d directory. # See http://nginx.org/en/docs/ngx_core_module.html#include # for more information. include /etc/nginx/conf.d/*.conf; } # |