upstream sent too big header while reading response header from upstream
Add the following to your conf file
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
502 Bad Gateway error - upstream sent too big header while reading response header from upstream
This is expected behavior as the nginx config for App Engine is using the default proxy_buffer_size which is 4K.
The workaround is to emit HTTP headers that are cumulatively under this limit. There is an open feature request to increase this however it seems it is unlikely to be increased to 128K. If increasing to 128K is the only solution for your use case I suggest creating a request for it with this issue tracker and include the business impact to illustrate the need for the feature.
upstream sent too big header while reading response header from upstream, client (nginx, varnish)
So the answer isnt the best, but it seems to have settled it down.
I bypassed Varnish and setup nginx cache. With little to no impact on page speed.
The base configurations were correct, and without Varnish the errors went away.
Not the best, but, it works.
nginx - upstream sent too big header while reading response header from upstream
If you're capable of reconstructing exact POST
request via curl
or otherwise measure the actual header size, you can specify the proper size for uwsgi_buffer_size
(the directive that is related in your case).
Here's my post that has some insight into a similiar directive, proxy_buffer_size
. There are many *_buffer_size
directives, each "proxy"-like NGINX module has one (fastcgi, proxy, uwsgi), but how you approach their tuning (and how they essentially work) is the same.
You can try, without measurement, by placing directly in server
block:
uwsgi_buffer_size 16k;
uwsgi_busy_buffers_size 24k;
Related Topics
Gcm Notifications Not Receiving When App Is in Background Mode in Ios
How to Add Variation Stock Status to Woocommerce Product Variation Dropdown
What Are the Differences Between Composer Update and Composer Install
Is There an Equivalent For Var_Dump (PHP) in JavaScript
How to Use PHPexcel to Read Data and Insert into Database
How to Redirect Domain According to Country Ip Address
How to Retrieve Request Payload
Show a Pdf Files in Users Browser Via PHP/Perl
Netbeans Shows "Waiting For Connection (Netbeans-Xdebug)"
Get Original Url Referer With PHP
Checking If a Variable Is an Integer in PHP
How to Use the PHP That Brew Installed
The Openssl Extension Is Required For Ssl/Tls Protection
Execute Raw SQL Using Doctrine 2
Curl_Exec() Always Returns False
Send Post Request Using Volley and Receive in PHP