How to avoid nginx "upstream sent too big header" errors? How to avoid nginx "upstream sent too big header" errors? ruby-on-rails ruby-on-rails

How to avoid nginx "upstream sent too big header" errors?


Came across this error recently.

Since Passenger 3.0.8 there is now a setting that allows you to set the buffers and buffer size. So now you can do

http {    ...    passenger_buffers 8 16k;    passenger_buffer_size 32k;}

That resolved the issue for me.


Try to add this to the config:

http {    ...    proxy_buffers 8 16k;    proxy_buffer_size 32k;    }


Maybee adding this will make it work, how are you connecting to upstream? http, fastcgi or something else?

http {    ...    fastcgi_buffers 8 16k;    fastcgi_buffer_size 32k;}