Score:0

nginx error logging generates upstream sent too big header while reading response header from upstream

ki flag

When i add error_log('what ever') in my php scripts and there are to many in one script, it generates a 502 error with "upstream sent too big header while reading response header from upstream" in the error log. When i remove any of the error_log('what ever') in the php script, all is working again. Anybody any idea what the issue is?

Score:0
id flag

You need to identify where the request producing the original error was processed. 'Upstream' might be a lot of different things (proxy, fastcgi, uwsgi).

You need to tweak the proper upstream *_buffers and *_buffer_size to make the proper buffer(s) bigger.

You can set the following values and test if it works. If it doesn't work you can manually increase the value to 64k, 128k, 256k, and 512k.

*_buffers 16 32k;
*_buffer_size 64k;
*_busy_buffers_size 64k;
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.