1

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?

2
  • 1
    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, 2012 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) Feb 11, 2012 at 23:02

0

You must log in to answer this question.

Browse other questions tagged .