Topic: nginx: upstream sent too big header while reading response header

Hi!

I have nginx+php-fpm on my server. All works fine, but in one site I get 502 page. I found following error in my nginx-error.log:

Feb 23 20:21:06 server nginx: 2012/02/23 20:21:06 [error] 81695#0: *97 upstream sent too big header while reading response header from upstream, client...

How to fix this?

Share

Re: nginx: upstream sent too big header while reading response header

Try to add two lines in your nginx.conf in http section:

http {
    ...

    fastcgi_buffers 8 16k;
    fastcgi_buffer_size 32k;

    ...
}

Then restart nginx with command:

# service nginx restart