Hi everyone,
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!
Hi @ashishmpatel20,
As it already has been suggested, I’ll recommend using Watchdong as well. It’s a great tool to help you with exactly what you are looking for and it’s pretty straight forward to install
Installation
In most Linux distributions you can install from the package manager. For example on Ubuntu/Debian-based systems:
apt-get install watchdog
To check more information about it, you can check HERE
Regards, KDSys
This comment has been deleted
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.