Report this

What is the reason for this report?

How do I troubleshoot web server timeout in a droplet?

Posted on May 26, 2019

Hi.

I have an Apache/PHP/MySQL server setup on a droplet, and sometimes the server will “go down” and the sites will time out in a browser.

Restarting Apache resolves the issue for the time being, but I did that last night only to find the site down again this morning (so I rebooted Linux), so I’m concerned.

I found a 3rd party service that lets me know when this happens, but I can’t always be there to restart the system.

The general Apache error log did not show anything out of the ordinary as far as I can tell. I know enough to be dangerous on Linux as long as I can Google things, but this is beyond me.

I spent a lot of time tightening security, and while I have seen dozens of hack attempts a minute within the first hour of the server going up, I’m fairly sure it’s reasonably locked up.

What steps can you recommend I take to track down this issue?

Are there any tools I can use to automatically restart apache when there’s an issue?

Thanks!



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.

For the hack attempts, why not have a look at Cloudflare free plan, it helps protect against cross site scripting and DDoS attempts.

Regarding your timeouts, its probably from exhausted server memory / cpu. Check your memory, cpu and server load with htop (sudo apt-get install htop) and then run command htop.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.