I'm using a MySQL database and Apache server with an AWS EC2 instance running AWS Linux. I start them both using the
service command, but I am not familiar with any other tool that would come pre-installed or available through package manager that would ensure they don't get interrupted.
Now I'm just running a script manually that restarts all the services when an issue with the site occurs:
sudo service httpd restart && sudo service php-fpm-5.6 restart && sudo service mysqld restart
Sometimes the services run into and error and hang or otherwise get interrupted and it also crashes my site. I'm looking for a way to restart the services and monitor their health either through a command line utility, modifying config files, or any other way that works.