我在Ubuntu14.04LTS上使用最新的php5-fpm,如果端口9000失败,尝试通过monit重新启动它。
我的配置:
check process php5-fpm with pidfile /var/run/php5-fpm.pid
group www-data
start program = "service php5-fpm start"
stop program = "service php5-fpm stop"
if failed port 9000 then restart
if 1 restarts within 5 cycles then alert
if 3 restarts within 5 cycles then timeout如果php5-fpm停止,我收到一封来自monit的电子邮件,到目前为止还不错。但在那之后,我得到了另一个“失败启动php5-fpm-tcp”和php5-fpm驻留停止。
我还尝试了以下开始/停止吐露:
start program = "/etc/init.d/php5-fpm start"
stop program = "/etc/init.d/php5-fpm stop"和:
start program = "/sbin/start-stop-daemon --start --pidfile /var/run/php5-fpm.pid --exec /usr/sbin/php5-fpm"
stop program = "/sbin/start-stop-daemon --stop --pidfile /var/run/php5-fpm.pid"但我总是收到同样的“未能启动php5-fpm-tcp”的邮件。
在ubuntu14.04上有其他方法启动php5-fpm吗?
发布于 2014-11-10 12:00:40
我已经使用代理脚本完成了它。
startphpfpm.sh:
#!/bin/bash
service php5-fpm startstopphpfpm.sh:
#!/bin/bash
service php5-fpm stop而monit-config现在使用它们代替/etc/init.d/php5-fpm或服务php5-fpm。
https://stackoverflow.com/questions/25136518
复制相似问题