upstream sent too big header while reading response header from upstream

If you’re getting this error message
“upstream sent too big header while reading response header from upstream”
in the nginx error log and are using fcgi,
in my case I was running a PHP script via PHP FPM 8.2 and received a 502 response from nginx.

I fixed the issue.

Previously I had this nginx vhost conf for PHP scripts

There are alternate solution for non-fastcgi setups. This however is a fastcgi setup so I have added:

to the configuration, and reloaded nginx.

The final configuration part looks like the following:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.