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?

  • Are you using a Load Balancer in front of your Nginx? If yes, you can try increase the timeout of the LB. – MassiveGRID Mar 16 at 17:45
  • Please, could you make your introduction more clear: your server was down did you mean baremetal, or whole service (nginx+php-fpm)? Are you looking for the reason of failing to serve http requests, or the reason of those amount of 499? – Victor Perov Mar 16 at 20:41
  • @MassiveGRID No there is no load balancer. – rev Mar 16 at 20:42
  • @VictorPerov If by bare-metal you mean something like power outage, no I was able to ssh to server. I think I cleared server was down by saying for serving http requests. So yes better to say web server was down. And to answer your second question I think both because they are probably related. – rev Mar 16 at 20:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.