php 5.4.7 via mod_fcgi

when I run the site sometimes it works, sometimes it crashed with 500 Internal Error, this is what I see in error.log everytime I run the script

[Mon Sep 24 18:50:43 2012] [warn] [client] (104)Connection reset by peer:   mod_fcgid: error reading data from FastCGI server
[Mon Sep 24 18:50:43 2012] [error] [client] Premature end of script headers: api.php

any ideas?

vhost config:

<VirtualHost :80>
ServerAdmin admin@saritasa.com
DocumentRoot "/home/www/sites/test.com/html/development"
ServerName test.com
ServerAlias www.test.com
ErrorLog "/home/www/sites/test.com/logs/error_log"
CustomLog "/home/www/sites/test.com/logs/access_log" common

<IfModule mod_fcgid.c>
<Directory /home/www/sites/test.com/html/development>
  Options +ExecCGI
  AllowOverride All
  AddHandler fcgid-script .php
  FCGIWrapper /home/www/php-fcgi-scripts/php-fcgi-starter .php
  Order allow,deny
  Allow from all

FcgidMaxRequestLen 1073741824

fcgi.d conf

LoadModule fcgid_module modules/mod_fcgid.so
# Use FastCGI to process .fcg .fcgi & .fpl scripts
AddHandler fcgid-script fcg fcgi fpl

# Sane place to put sockets and shared memory file
FcgidIPCDir /var/run/mod_fcgid
FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm

IdleTimeout 300
BusyTimeout 300
ProcessLifeTime 7200
IPCConnectTimeout 300
IPCCommTimeout 7200

PHP_Fix_Pathinfo_Enable 1




export PHP_FCGI_TIMEOUT=1200

exec $PHP_CGI -c $PHP_INI

Turned out PHP 5.4.7 doesn't work well with recent APC module. I disabled it in php547-fastcgi.ini - and everything started to work properly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.