Solve [error] 28901#0: *401 upstream sent too big header while reading response header from upstream


Today I got this 502 error on my websites :

1
Solve [error] 28901#0: *401 upstream sent too big header while reading response header from upstream, client: 116.86.214.27, server: yodi.biz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "yodi.biz"

After looking at NGINX documentation, i found the problem in my fastcgi buffers. So, the solution is just open /etc/nginx/nginx.conf and on “http” part, put this :

1
2
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;

If you still get 502 upstream sent too big header, then try to increase the fastcgi buffers 🙂


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.