It seems like your Nginx service has reached it’s worker’s limit. Imagine you have 300 slots in a room, when you fill them with 300 people, in order for the next person to enter the room, one must leave it. This seems to be happening with your website. This is not necessarily a problem with the droplet itself but the high traffic you are experiencing.
How to fix
worker_connections command tells our worker processes how many people can simultaneously be served by Nginx. The default value is 768; however, considering that every browser usually opens up at least 2 connections/server, this number can half. This is why we need to adjust our worker connections to its full potential. We can check our core’s limitations by issuing a ulimit command:
To edit the limit, you’ll need to edit the Nginx config:
sudo nano /etc/nginx/nginx.conf
If you have one CPU Core, I’ll recommend adding the following settings to your Nginx config file :
If you have 2 CPU Cores, you should be okay to double the value.
As soon as you are ready, save the file and restart your Nginx
service nginx restart
If you want to know more about Optimizing Nginx, I’ll recommend you to check the following DigitalOcean Tutorial on how you can do that
Nginx is a fast and lightweight alternative to the sometimes overbearing Apache 2. However, Nginx just like any kind of server or software must be tuned to help attain optimal performance. Here's how to optimize Nginx configuration.