Today, I can’t connect to my Dart server. I tried to open my server with ipv4 but the browser is loading too long. Then I tried to connect it by using SSH and I got “Error: Connection timed out after 20 seconds of inactivity” and “Error: Could not connect to server”. Then I tried to use the console in my droplet but it can’t connect too. So, I restart my host with click turn-off and turn-on. Finally, my host can connect. After that, I open my console log and found this server was dowed 2 days ago without notification!? What happened? How to prevent that?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Hey @sittiphansittisak,
It seems like your Apache Workers were full(if you are using Apache). Assuming you are using Apache, what you are describing is not high load or websites going down but your Apache Workers filling up.
So first, what are Apache Workers and what are they used for:
Imagine you are in a cinema, and there are 300 chairs inside. Those are the Apache Workers and the movie is your Webiste. If someone wants to watch the movie(your website) they need to sit in the chair (Apache Workers). If all 300 chars are taken, the 301 person needs to wait for someone to leave in order for them to sit and watch the movie. That’s how ApacheWorkers work. Once all ApacheWorkers are taken, a new person that wants to open your website waits for a spot to be open and only after that they can see your website.
Usually, these limits are set by 256 by default but they can be increased.
You can open your Apache configuration file. In there you should see something similar to:
Increase both the ServerLimit and MaxClients options, restart Apache, and see if this would solve your issue.
It’s possible they do not exist (haven’t been added) and the default values are the ones above. Adding them to the prefork content of apache mods should be fine as well.
Don’t forget to restart Apache afterward.
Hi there,
I would recommend starting with the following:
Check your system logs in the
/var/log
directory and look for any errors that might have caused the problem like an out of memory errors and etc.Check your resource utilization graphs in your DigitalOcean Control panel to verify if your server was running low on resources like RAM or CPU. Additionally, you can monitor server resources via SSH directly and keep an eye on your server’s resource usage, such as CPU, memory, and disk space. High resource usage can cause a server to become unresponsive. Use tools like
htop
,vmstat
, andiostat
to monitor your server’s performance:If you are running low on resources, make sure to add more RAM and CPU to your server or add a swap file as well so that you could have some extra buffer.
Use the DigitalOcean Uptime service so that you could get notified if your website is not reachable:
Hope that this helps!
Best,
Bobby
Hello @sittiphansittisak
Can you share more details about the droplet configuration? Do you run a busy website that gets a lot of traffic?
One thing you can do i to create an uptime alert so you can be aware when your application/website is down. Check the docs here:
https://docs.digitalocean.com/products/uptime/how-to/create-alerts/
Another step is to monitor the droplet resource usage so you can act before the droplet becomes unresponsive:
https://docs.digitalocean.com/products/monitoring/how-to/set-up-alerts/
Hope that this helps!