I am having some problems with ubuntu and php5-fpm on my VPS. Php works fine, however it throws terminal error when I am trying to reload / restart / stop it. Basically, I c
Seems like the service command sometimes fails. I don't know about the reason, however I ended up using this workaround in /etc/logrotate.d/php5-fpm:
/var/log/php5-fpm.log {
...
postrotate
# The original reload command did never work
#invoke-rc.d php5-fpm reopen-logs > /dev/null
# Workaround for cases when the reload command fails for some reason
service php5-fpm reload > /dev/null 2>&1
[ $? = 0 ] || ( service php5-fpm stop; pkill php5-fpm; service php5-fpm start ) > /dev/null
endscript
}