1

I get an Error 500 / 503. My theory was that php5-fpm was being killed and re-spawned every second due to messages like this in 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

I have concluded that that is normal behaviour. My Error 500 / 503 must be coming from something else. When I press F5 several times, the error occurs. any ideas?

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

1 Answer 1

1

Most likely your PHP script has an error. to see more, use php's error logging directive in 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
6
  • I added your lines. I see now a couple of warnings. No errors. Same code works in different server. When I get the error 503 this is what shows in php5-fpm.log: 2015-01-28 09:37:52: (mod_fastcgi.c.1732) connect failed: No such file or directory on unix:/var/run/php5-fpm.sock 2015-01-28 09:37:52: (mod_fastcgi.c.3002) backend died; we'll disable it for 1 seconds and send the request to another backend instead: reconnects: 0 load: 1 2015-01-28 09:37:54: (mod_fastcgi.c.2829) fcgi-server re-enabled: unix:/var/run/php5-fpm.sock Maybe php-fpm not able to handle a couple of requests?
    – acanessa
    Jan 28, 2015 at 15:50
  • Did you check /var/log/php-errors.log ? or which path you have used.
    – risyasin
    Jan 28, 2015 at 15:57
  • Yes. Nothing there. Nada. Maybe I need to add more resources in some config file? HW is Dual Core 3Ghz, 2GB Mem., but it's crashing with just a few requests.
    – acanessa
    Jan 28, 2015 at 16:04
  • Maybe your script is just turning off the error reporting runtime. as a developer, i am so sure that is a php script error.
    – risyasin
    Jan 28, 2015 at 20:48
  • I'll check for php scripts errors. Will post solution if found, thanks!
    – acanessa
    Jan 29, 2015 at 14:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .