Question
Automatically starting HHVM (or any other service, really) when it's not running?
So I have a small droplet that I run a few small WordPress sites on with Nginx, HHVM, MySQL, etc.
Once a week or so, seemingly randomly, I visit sites on the server and am greeted with a “502 Bad Gateway” error from Nginx. When I investigate further in SSH, I discover that HHVM is not running.
I simply run the “sudo service hhvm start” command and everything comes up and running again.
So I have a couple questions:
1) Is there any reason why HHVM would suddenly stop running like I’ve described? I believe I have it included in my boot sequence and I regularly update all my packages.
2) Is there a way to run an automated check, maybe once every five minutes or so to check if HHVM is running, and if not, starting it?
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.
×