Can't connect to my droplet(ipv4, console)!?. Need to turn-off the droplet and turn-on it again to fix this.

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?

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Site Moderator
Site Moderator badge
April 12, 2023

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:

ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000

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.

Bobby Iliev
Site Moderator
Site Moderator badge
April 11, 2023

Hi there,

I would recommend starting with the following:

  • Check your server logs to identify what might have caused the crash. For example, you could use this script here which will help you summarize your access logs and see if there was some suspicious activity :

BASH Script to Summarize Your NGINX and Apache Access Logs

  • 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, and iostat to monitor your server’s performance:

How to find the processes that are consuming the most server resources?

  • 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!



Site Moderator
Site Moderator badge
April 11, 2023

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:

Another step is to monitor the droplet resource usage so you can act before the droplet becomes unresponsive:

Hope that this helps!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel