Project

General

Profile

500 Internal Server Error with mod_fastcgi.c

Added by raven_kg over 12 years ago

Hi all! I have installed lighttpd-1.4.29 and php-5.3.8-4 (fpm) on RHEL6.1. From time to time I got 500 Internal Server Error and have this in error logs:

2012-01-06 12:53:56: (mod_fastcgi.c.2566) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:9001
2012-01-06 12:53:56: (mod_fastcgi.c.3354) response not received, request sent: 1159 on socket: tcp:127.0.0.1:9001 for /any_page.php?any_request, closing connection

After restart php-fpm everything returns to normal.

My php-fpm configs:


cat /etc/php-fpm.d/port1.conf
[port1]
listen = 127.0.0.1:9001
user = lighttpd
group = lighttpd
pm = dynamic
pm.max_children = 300
pm.start_servers = 50
pm.min_spare_servers = 25
pm.max_spare_servers = 55
pm.max_requests = 5000
request_terminate_timeout = 600
request_slowlog_timeout = 60
slowlog = /var/log/php-fpm/www-slow.log
rlimit_files = 10240
rlimit_core = 0
php_flag[display_errors] = off
php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = on
php_admin_value[memory_limit] = 1024M


cat /etc/php-fpm.d/port2.conf
[port2]
listen = 127.0.0.1:9002
user = lighttpd
group = lighttpd
pm = dynamic
pm.max_children = 300
pm.start_servers = 50
pm.min_spare_servers = 25
pm.max_spare_servers = 55
pm.max_requests = 5000
request_terminate_timeout = 600
request_slowlog_timeout = 60
slowlog = /var/log/php-fpm/www-slow.log
rlimit_files = 10240
rlimit_core = 0
php_flag[display_errors] = off
php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = on
php_admin_value[memory_limit] = 1024M

My /etc/lighttpd/conf.d/php-tcp.conf included in virtual hosts configs.

#### FastCGI via TCP with balancing
#fastcgi.debug = 1
fastcgi.server = ( ".php" =>
(
( "host" => "127.0.0.1","port" => 9001, "broken-scriptfilename" => "enable" ),
( "host" => "127.0.0.1","port" => 9002, "broken-scriptfilename" => "enable" ))
)

PHP have not enabled cachers/optimizers like xCache or eAccellerator. What's wrong? I changed lighttpd to nginx - all works fine! But, I want to return to lighttpd. Anybody help me please)))

P.S. Sorry for my English)))