I developed a workaround based upon:
http://serverfault.com/questions/114052/logging-a-daemons-output-with-
upstart based upon the 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" as a
variable 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, which is what
was possible on 12.04 without this mucking around.

The ultimate issue is php5-fpm ignoring some configuration variables
when run with the "--nodaemonize" option, and that needs addressing
upstream.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to php5 in Ubuntu.
https://bugs.launchpad.net/bugs/1319595

Title:
  upstart script ignores some php-fpm.conf parameters, cannot be
  bypassed in preference of SystemV init script.

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

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to