known icon indicating copy to clipboard operation
known copied to clipboard

Diagnostics page 502 error upstream sent too big header

Open aklemm opened this issue 5 years ago • 2 comments

While clicking on the Diagnostics page. I encountered a 502 error from nginx. I've installed from Github on an nginx+postgres VM. version.known: version = '1.1.9' build = 2020041901

Here is a typical nginx error I was getting trying to load the page:

2020/04/24 04:34:27 [error] 7581#7581: *6618 upstream sent too big header while reading response header from upstream, client: xx.xxx.xx.xx, server: mydomain.tld, request: "GET /admin/diagnostics/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "mydomain.tld" 2020/04/24 04:34:27 [error] 7581#7581: *6618 FastCGI sent in stderr: "PHP message: Known (mydomain.tld): debug - Checking for HSTS headers

I was able to solve the issue adding some fastcgi configurations in nginx.conf per https://stackoverflow.com/questions/23844761/upstream-sent-too-big-header-while-reading-response-header-from-upstream

fastcgi_buffers 16 16k; fastcgi_buffer_size 32k;

I am unsure if this should be an administration fix as I've done or if it should be fixed in the application.

aklemm avatar Apr 24 '20 05:04 aklemm

I prefer to see config changes to be done at the admin level, unless this issue affects a large portion of Nginx users.

Definitely something to put in the troubleshooting guide though. Fancy putting a PR together for that?

mapkyca avatar Apr 24 '20 08:04 mapkyca

Sure, I’ll give it a shot.

aklemm avatar Apr 24 '20 13:04 aklemm