Edit report at http://bugs.php.net/bug.php?id=53311&edit=1
ID: 53311
Comment by: paulgao at yeah dot net
Reported by: paulgao at yeah dot net
Summary: startup failed.
Status: Feedback
Type: Bug
Package: FPM related
Operating System: Centos 64-bit 5.5
PHP Version: 5.3SVN-2010-11-15 (SVN)
Assigned To: fat
Block user comment: N
Private report: N
New Comment:
startup script:
#! /bin/sh
ulimit -HSn 65000
ulimit -c unlimited
echo '/tmp/core-%e.%p' > /proc/sys/kernel/core_pattern
php_fpm_BIN=/usr/local/php/sbin/php-fpm
php_fpm_CONF=/home/codebase/server-config/php-fpm-api-test.ini
php_fpm_PID=/home/php-fpm.pid
php_opts="--fpm-config $php_fpm_CONF"
#/usr/bin/strip $php_fpm_BIN /usr/local/php/bin/php
wait_for_pid () {
try=0
while test $try -lt 35 ; do
case "$1" in
'created')
if [ -f "$2" ] ; then
try=''
break
fi
;;
'removed')
if [ ! -f "$2" ] ; then
try=''
break
fi
;;
esac
echo -n .
try=`expr $try + 1`
sleep 1
done
}
case "$1" in
start)
echo -n "Starting php-fpm "
$php_fpm_BIN $php_opts
if [ "$?" != 0 ] ; then
echo " failed"
exit 1
fi
wait_for_pid created $php_fpm_PID
if [ -n "$try" ] ; then
echo " failed"
exit 1
else
echo " done"
fi
;;
stop)
echo -n "Gracefully shutting down php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running
?"
exit 1
fi
kill -QUIT `cat $php_fpm_PID`
wait_for_pid removed $php_fpm_PID
if [ -n "$try" ] ; then
echo " failed. Use force-exit"
exit 1
else
echo " done"
fi
;;
force-quit)
echo -n "Terminating php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running
?"
exit 1
fi
kill -TERM `cat $php_fpm_PID`
wait_for_pid removed $php_fpm_PID
if [ -n "$try" ] ; then
echo " failed"
exit 1
else
echo " done"
fi
;;
restart)
$0 stop
$0 start
;;
reload)
echo -n "Reload service php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running
?"
exit 1
fi
kill -USR2 `cat $php_fpm_PID`
echo " done"
;;
*)
echo "Usage: $0 {start|stop|force-quit|restart|reload}"
exit 1
;;
esac
Previous Comments:
------------------------------------------------------------------------
[2010-11-17 08:30:41] [email protected]
with which user do you launch FPM ?
------------------------------------------------------------------------
[2010-11-17 02:52:24] paulgao at yeah dot net
I change log level = debug, and daemonize = off:
[r...@host-c11 logs]# /home/codebase/shell/php-fpm-api-test.sh start
Starting php-fpm Nov 17 09:49:46.600069 [DEBUG] pid 24660,
fpm_event_init_main(), line 93: libevent 1.4.14b-stable: using epoll
Nov 17 09:49:46.600466 [NOTICE] pid 24660, fpm_init(), line 52: fpm is
running, pid 24660
Nov 17 09:49:46.602313 [DEBUG] pid 24660, fpm_children_make(), line 403:
[pool www] child 24661 started
Nov 17 09:49:46.603101 [DEBUG] pid 24660, fpm_children_make(), line 403:
[pool www] child 24662 started
Nov 17 09:49:46.605003 [DEBUG] pid 24660, fpm_children_make(), line 403:
[pool www] child 24664 started
Nov 17 09:49:46.606135 [DEBUG] pid 24660, fpm_children_make(), line 403:
[pool www] child 24665 started
Nov 17 09:49:46.607143 [DEBUG] pid 24660, fpm_children_make(), line 403:
[pool www] child 24666 started
Nov 17 09:49:46.608088 [DEBUG] pid 24660, fpm_children_make(), line 403:
[pool www] child 24667 started
Nov 17 09:49:46.609757 [DEBUG] pid 24660, fpm_children_make(), line 403:
[pool www] child 24669 started
Nov 17 09:49:46.610090 [DEBUG] pid 24660, fpm_children_make(), line 403:
[pool www] child 24670 started
Nov 17 09:49:46.611090 [DEBUG] pid 24660, fpm_children_make(), line 403:
[pool www] child 24671 started
Nov 17 09:49:46.612089 [DEBUG] pid 24660, fpm_children_make(), line 403:
[pool www] child 24673 started
Nov 17 09:49:46.613112 [DEBUG] pid 24660, fpm_children_make(), line 403:
[pool www] child 24674 started
Nov 17 09:49:46.614087 [DEBUG] pid 24660, fpm_children_make(), line 403:
[pool www] child 24676 started
Nov 17 09:49:46.615136 [DEBUG] pid 24660, fpm_children_make(), line 403:
[pool www] child 24677 started
Nov 17 09:49:46.616087 [DEBUG] pid 24660, fpm_children_make(), line 403:
[pool www] child 24679 started
Nov 17 09:49:46.617097 [DEBUG] pid 24660, fpm_children_make(), line 403:
[pool www] child 24680 started
Nov 17 09:49:46.618087 [DEBUG] pid 24660, fpm_children_make(), line 403:
[pool www] child 24682 started
Nov 17 09:49:46.618121 [NOTICE] pid 24660, fpm_event_loop(), line 111:
ready to handle connections
Nov 17 09:49:46.618155 [DEBUG] pid 24660, fpm_got_signal(), line 48:
received SIGCHLD
Nov 17 09:49:46.618203 [WARNING] pid 24660, fpm_children_bury(), line
249: [pool www] child 24661 exited with code 1 after 0.015918 seconds
from start
Nov 17 09:49:46.619091 [NOTICE] pid 24660, fpm_children_make(), line
403: [pool www] child 24683 started
Nov 17 09:49:46.619126 [WARNING] pid 24660, fpm_children_bury(), line
249: [pool www] child 24662 exited with code 1 after 0.016037 seconds
from start
Nov 17 09:49:46.620113 [NOTICE] pid 24660, fpm_children_make(), line
403: [pool www] child 24685 started
Nov 17 09:49:46.620147 [WARNING] pid 24660, fpm_children_bury(), line
249: [pool www] child 24664 exited with code 1 after 0.015152 seconds
from start
Nov 17 09:49:46.621129 [NOTICE] pid 24660, fpm_children_make(), line
403: [pool www] child 24686 started
Nov 17 09:49:46.621170 [WARNING] pid 24660, fpm_children_bury(), line
249: [pool www] child 24665 exited with code 1 after 0.015041 seconds
from start
Nov 17 09:49:46.622087 [NOTICE] pid 24660, fpm_children_make(), line
403: [pool www] child 24688 started
Nov 17 09:49:46.622120 [WARNING] pid 24660, fpm_children_bury(), line
249: [pool www] child 24666 exited with code 1 after 0.014983 seconds
from start
Nov 17 09:49:46.623089 [NOTICE] pid 24660, fpm_children_make(), line
403: [pool www] child 24689 started
Nov 17 09:49:46.623121 [WARNING] pid 24660, fpm_children_bury(), line
249: [pool www] child 24667 exited with code 1 after 0.015042 seconds
from start
Nov 17 09:49:46.624087 [NOTICE] pid 24660, fpm_children_make(), line
403: [pool www] child 24691 started
Nov 17 09:49:46.624123 [WARNING] pid 24660, fpm_children_bury(), line
249: [pool www] child 24669 exited with code 1 after 0.014373 seconds
from start
Nov 17 09:49:46.625096 [NOTICE] pid 24660, fpm_children_make(), line
403: [pool www] child 24692 started
non-stop output... :-(
------------------------------------------------------------------------
[2010-11-16 22:26:37] [email protected]
with which user do you run FPM ?
Try to set daemonize = off in php-fpm.conf and run it again.
------------------------------------------------------------------------
[2010-11-16 09:23:02] paulgao at yeah dot net
I use patch V2.
if old fpm.log not remove, startup still failed.
but old fpm.log removed, startup is OK. restart is OK too.
what problem?
------------------------------------------------------------------------
[2010-11-16 09:17:44] [email protected]
can you:
1- stop FPM
2- remove or move /home/logs/fpm.log
3- set log level to DEBUG
4- run FPM
5- dump the content of /home/logs/fpm.log here
thx
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=53311
--
Edit this bug report at http://bugs.php.net/bug.php?id=53311&edit=1