Назад | Перейти на главную страницу

Ошибка 500/503

Я получаю ошибку 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

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

lighttpd/1.4.31 (ssl) - a light and fast webserver
Build-Date: Mar 13 2014 02:17:09

www.conf

[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 = /

php5-fpm.log

[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

Lighttps Error.Log

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 в 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