問題 構成 突発的に、1台のサーバーで5秒間だけ、502 Bad Gateway が数百〜数千出て困った。(②の部分) nginx.conf proxy_connect_timeout 5; 5秒はnginx設定によるモノなのだろうが、なんで一瞬だけ出るのか全然解らなかった。 nginxのerror.log にはこう出てて、これってproxy_passの設定ミスってる時の奴だよな。。と。。(③の部分) /var/log/nginx/error.log upstream prematurely closed connection while reading response header from upstream, client: 172.XX.XX.XX, server: _, request: "GET / HTTP/1.1", upstream: ... 一瞬、nginx -> no
![AWSでもsysctlやらなきゃならんのか・・・ - 中年engineerの独り言 - crumbjp](https://cdn-ak-scissors.b.st-hatena.com/image/square/f27dc067fe4bd760ce926041ca6c9f03678bef12/height=288;version=1;width=512/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fh%2Fhiroppon%2F20201220%2F20201220100901.png)