Resolve: Upstream sent too big header while reading response header from upstream when using NginX PHP FPM
Resolve: Upstream sent too big header while reading response header from upstream when using NginX PHP FPM
When working with NginX you will be using an upstream PHP FPM server. Because of the way NginX works it will treat this upstream server as a proxy server which you will use to server PHP requests. One of the settings you can control is the buffer size used for the headers. You want to size your buffer size correctly otherwise you might get a lot of errors like this one:
2013/12/21 22:58:04 [error] 46171#0: *1670 upstream sent too big header while reading response header from upstream, client: 123.123.123.123, server: cloudingenium.com, request: “GET /wp-admin/admin.php?page=jetpack&action=authorize […] upstream: “fastcgi://unix:/var/run/php5-fpm.sock:”, host: “www.CloudIngenium.com”
Simply add the following lines if you are missing them and adjust the sizes as you see fit:
2
3 4 5 |
http {
…. fastcgi_buffers 16 32k; fastcgi_buffer_size 32k; … |
or adjust the proxy buffer if you are using a proxy/cache:
proxy_buffer_size 64k;
proxy_buffers 4 128k;
proxy_busy_buffers_size 128k;
Don´t forget “proxy_temp_file_write_size” must be equal to or greater than the maximum of the value of “proxy_buffer_size” and one of the “proxy_buffers”.
Love
Can we use Let's Encrypt, the free and open certificate authority?
Hola! gracias por la info, me sirvió el comando sacandole el nombre del server. En mi caso, fue una migración…
Yes 3rd option helped me too. I removed the WC key Values from config file then started working.
I know this is from 2014. But really, thank you!