Our server was down for serving http requests for some minutes. The web server is nginx and php-fpm handles the php processes. So in the middle of downtime duration I took a look at nginx's
access.log file. Most of requests were getting a 499 response code which is nginx particular status code for when client closes the connection before the server answers.
I restarted nginx
sudo nginx -s reload but that didn't seem to effect the behavior. I then restarted
php-fpm service and everything came back normal. Before issuing service restart,
htop was showing no high CPU usage.
My question is how can I find the reason in such situations and where should I start from to get to the bottleneck?