Dear All,

I cannot access my website (www.spineandbackpain.com). It is managed on this server DigitalOcean. It is gone now. Where is it? Why is it not working?

Please reply to davordasic@hotmail.com

Many thanks for all your help!

Davor

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @davordasic,

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 : The 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:
ulimit -n

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 :

worker_processes 1;
worker_connections 1024;

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

https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration

Regards,
KDSys

by Alex Kavon
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.
Submit an Answer