Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a system where each user (about 20) gets their own instance of nginx and their own small pool of PHP5-FPM processes. A front-end nginx instance proxies requests to the appropriate nginx instance, which then either sends it to PHP5-FPM or serves it itself.

The strange thing is that every so often (once a couple of months ago, once today at 6:30 AM) the pools all exit without writing anything to the php5-fpm.log file they're configured to write to. (The front-end then starts returning 502 errors because it can't get the request to the PHP workers.)

I'm using Ubuntu 11.10 and PHP 5.3.6, with one change from the default package: I have changed the syntax for the cron job to clean up old sessions based on this answer on ServerFault. The new syntax is:

09,39 *     * * *     root   [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -amin +$(/usr/lib/php5/maxlifetime) -delete

I've checked syslog around that time, and the only activity around that time is cron logging a command at 6:25 AM:

Feb 10 06:25:01 peninsula CRON[31060]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ))

I don't see anything in /etc/cron.daily/ that looks like it would have any effect on PHP5-FPM:

$ ls /etc/cron.daily/
apport  apt  aptitude  bsdmainutils  dpkg  logrotate  man-db  mlocate  passwd  popularity-contest  standard

Anyone experienced something similar? Anyone have suggestions of where I should look next?

share|improve this question
What does /var/log/messages (is there a /var/log/dpkg? I can't remember) show? Did aptitude suddenly decide you needed a PHP update, and not properly restart the service when it's done? – devicenull Feb 11 '12 at 1:29
I checked /var/log/apt/history.log and found that about 5 minutes before the errors started, the system had auto-installed a bunch of php-related updates. I bet that's what caused it. (Of course, now I need to figure out how to restart the pools on package updates, since they're not controlled by upstart) – josePhoenix Feb 11 '12 at 23:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.