Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

NGINX: Disk write spike and/or not enough workers error from sudden surge in traffic causing 500 errors

$
0
0
I have been trying to diagnose an issue we have on our production servers. We have a server running NGINX as a load balancer which splits requests between four application servers. At least a few times throughout the day while testing the site we get 500 errors that only last for a few seconds.

Looking through the error logs and access logs, as well as graphs on new relic and our hosting service I have noticed a few things...

A few times a day there are sudden and massive jumps in disk write on the load balancer. I'm pretty sure this is due to so many requests being written to the access log in a short period of time (yesterday it was over 300 MB, most of which came in a very short period of time)... It's almost as if a bunch of requests are being blocked, piled up and then spit out simultaneously.

Also, once in a while I get a "768 worker connections is not enough..." in the error logs. I'm guessing I just need to raise this limit, but I'm not sure by how much, or how I can find the max that will work.

I'm not sure if these two issues are connected, or if either one is causing our random 500 errors.

Any insight or advice on further diagnosis would be greatly appreciated!

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>