I’ve been running into issues where my website becomes non-responsive or very slow to load. Currently I’m using an external uptime monitor to notify me when this happens and I manually go into the DO control panel to do a Power Cycle, which fixes the problem. I’m not sure WHY this keeps happening but this fix seems to be working fine. The script I’m running does not have any MySQL connections, it is purely based on PHP.
Looking over the graphs in the DO control panel I notice no significant changes in CPU, bandwidth or disk spikes. The most I’ve ever been at was around 45% CPU for a short period of time. I don’t know what’s causing it and the graphs seem to offer me no clues, since even those spikes don’t correlate well to the downtime.
The only solution I can think of is to run a cheap $5 droplet which would run a cron say every 30 seconds, to check for downtime, and then execute some PHP code to powercycle the droplet automatically. Problem is I have no idea how to do this! Could anyone provide some guidance?
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!