Reputation: 11
I use this configuration to restart php-fpm
every 15 minutes, but after this script runs for 4-5 times, I've found that it sometimes only stops fpm, and does not start it again. This seems to occur randomly.
*/15 * * * * /etc/init.d/php-fpm stop && /etc/init.d/php-fpm start
or
*/15 * * * * /etc/init.d/php-fpm stop ; /etc/init.d/php-fpm start
So, is there a different way to restart fpm
when calling it in a CRON job? What would be the correct way to call this restart?
Upvotes: 1
Views: 2256
Reputation: 43441
Instead of running two commands run single restart
/etc/init.d/php-fpm restart
Upvotes: 1