我得到一个错误500 / 503.我的理论是,php5-fpm被杀死,每秒钟重新生成,由于这样的消息在php5-fpm.log
[27-Jan-2015 08:21:34] NOTICE: fpm is running, pid 30045 [27-Jan-2015 08:21:34] NOTICE: ready to handle connections [27-Jan-2015 08:21:44] NOTICE: Finishing ... [27-Jan-2015 08:21:44] NOTICE: exiting, bye-bye! [27-Jan-2015 08:21:44] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful [27-Jan-2015 08:21:44] NOTICE: fpm is running, pid 30066 [27-Jan-2015 08:21:44] NOTICE: ready to handle connections [27-Jan-2015 08:21:54] NOTICE: Finishing ... [27-Jan-2015 08:21:54] NOTICE: exiting, bye-bye! [27-Jan-2015 08:21:55] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful
我已经断定这是正常的行为。 我的错误500/503必须来自别的东西。 当我多次按下F5时,发生错误。 有任何想法吗?
PHP 5.4.36-0+deb7u3 (cli) (built: Jan 9 2015 08:07:06) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
lighttpd/1.4.31 (ssl) - a light and fast webserver Build-Date: Mar 13 2014 02:17:09
[www] ;prefix = /path/to/pools/$pool user = www-data group = www-data listen = /var/run/php5-fpm.sock ;listen = 127.0.0.1:9000 ;listen.backlog = 128 listen.owner = www-data listen.group = www-data listen.mode = 0660 ;listen.allowed_clients = 127.0.0.1 ; process.priority = -19 pm = static pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 pm.process_idle_timeout = 10s; ;pm.max_requests = 500 ;pm.status_path = /status ;ping.path = /ping ;ping.response = pong ;access.log = log/$pool.access.log ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" ;slowlog = log/$pool.log.slow ;request_slowlog_timeout = 0 ;request_terminate_timeout = 0 ;rlimit_files = 1024 ;rlimit_core = 0 ;chroot = chdir = /
[27-Jan-2015 08:21:55] NOTICE: fpm is running, pid 30087 [27-Jan-2015 08:21:55] NOTICE: ready to handle connections [27-Jan-2015 08:22:05] NOTICE: Finishing ... [27-Jan-2015 08:22:05] NOTICE: exiting, bye-bye! [27-Jan-2015 08:22:05] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful [27-Jan-2015 08:22:05] NOTICE: fpm is running, pid 30108 [27-Jan-2015 08:22:05] NOTICE: ready to handle connections [27-Jan-2015 08:22:15] NOTICE: Finishing ... [27-Jan-2015 08:22:15] NOTICE: exiting, bye-bye! [27-Jan-2015 08:22:15] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful
2015-01-27 08:36:22: (mod_fastcgi.c.2543) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: unix:/var/run/php5-fpm.sock 2015-01-27 08:36:22: (mod_fastcgi.c.3329) response not received, request sent: 1184 on socket: unix:/var/run/php5-fpm.sock for /index.php?, closing connection
很可能你的PHP脚本有错误。 看到更多,使用php的错误logging指令在php-fpm.conf。
php_admin_flag[log_errors]=On php_admin_value[error_reporting]=E_ALL php_admin_value[error_log]=/var/log/php-errors.log