-
-
Save fer-ri/db1c20e781fdaee706ef to your computer and use it in GitHub Desktop.
Crontab entry to monitor for php-fpm problems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Auto-restart PHP when it's returning errors | |
# | |
# Make sure that http://localhost/test.php is an actual PHP script. If it starts returning | |
# 500 errors, restart the PHP-FPM service | |
* * * * * /usr/bin/curl --head -sf http://localhost/test.php -o /dev/null || /usr/sbin/service php5-fpm restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment