I developed a workaround based upon:
http://serverfault.com/questions/114052/logging-a-daemons-output-with-
upstart wit hthe Last (Feb 12th) solution..

changed bits of /etc/init/php5-fpm.conf
script
  exec bash <<<EOT
  exec 1> >(logger -t syslog_tag_for_php) 2>&1
  exec /usr/sbin/php5-fpm --nodaemonize --fpm-config /etc/php5/fpm/php-fpm.conf
EOT
end script

ps auxfw output
root      5961  0.0  1.6 924120 67144 ?        Ss   13:41   0:00 php-fpm: 
master process (/etc/php5/fpm/php-fpm.conf)               
root      5963  0.0  0.0   9720   580 ?        S    13:41   0:00  \_ bash
root      5964  0.0  0.0   4336   632 ?        S    13:41   0:00  |   \_ logger 
-t syslog_tag_for_php
www_pool  5969  0.0  0.3 923688 12308 ?        S    13:41   0:00  \_ php-fpm: 
pool www_as_www_pool                                  
. . .

A slightly better solution would have the "syslog_tag_for_php" sourced
from /etc/default/php5-fpm so the init script is more generic.

This results in all php5-fpm master process logging going to syslog and
easily filtered into an appropriate logfile by the tag.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1423933

Title:
  php-fpm fails to use syslog when started by upstart

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php5-fpm/+bug/1423933/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to