I recently upgraded NGINX on my development web server to 1.22.1 and also upgraded PHP to 8.1.2. When browsing to the WordPress site I have installed I kept getting a 502 error and found this in my nginx error log:
"upstream sent too big header while reading response header from upstream"
I fixed it by adding this to my nginx.conf file after finding a solution through Google:
fastcgi_buffers 64 16k;
fastcgi_buffer_size 32k;
But while this fixed the error I don't fully understand these parameters. I'd like to configure them correctly for my server before doing the upgrades on my production server. Can anyone confirm whether this is correct or, if not, what I need to do to optimize these parameters for my server?
Thank you.