0

I have this error in my log :

upstream sent too big header while reading response header from upstream

And I tried to add

proxy_buffer_size   128k;
proxy_buffers   4 256k;
proxy_busy_buffers_size   256k;

to my nginx.conf http block but did not work

I also tried to add

fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;

to my conf file but I could not locate any location ~ .php$ {

So I wonder how I can over come this error ? adding

fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;

to a hand made php block gives me nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:6

3

For the upstream sent too big header while reading response header from upstream error:

  1. You need to identify where the request producing the original error was processed. 'Upstream' might be a lot of different things (proxy, fastcgi, uwsgi)
  2. You need to tweak the proper upstream *_buffers and *_buffer_size to make the proper buffer(s) bigger

As for the unknown directive "location", that is a totally unrelated error simply indicating your configuration is not valid (thus won't be loaded/applied). You made a syntaxic/lexicographic error while modifying your configuration. Check your changes.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.