06 Oct

Hou, senseless timeout setting of fcgid

Friday October 06th 2006, 11:06 am
Tags: ,

Don’t want to know how many people were hunting the reason for their FastCGI/FCGI installation throwing “premature end” 500 errors on them sometimes. If a CGI script (e.g. the PHP process) doesn’t answer for 5 seconds (yes, 5 seconds. Do not even think about doing a more complicated calculations inside your PHP scripts!), the user gets this nice HTTP error 500. As soon as you find out that not you are guilty (your script works just fine, only takes a bit longer), it’s even not that hard to find other people reporting the very same problem: Nikolas, Brian, Typo3 list, RubyOnRails wiki, RubyOnRails weblog, …

Once again, taken from RubyOnRails wiki, maybe it will help somebody (the docs can be found here):

 <IfModule mod_fcgid.c>
  ...
   IPCConnectTimeout 8
   IPCCommTimeout 48
  ...
 </IfModule>

Increasing the IPC timeout leaves enough time for your PHP script to finish. This solves the main problem in my Pingback implementation for PmWiki. It seems that the HTTP requests in the XMLRPC classes used there were blocking the PHP process, so it didn’t answer any IPC calls from mod_fcgid anymore.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Reddit
7 Comments

7 Comments »

 

RSS feed for comments on this post. TrackBack Website

Leave a comment

(required)

(required)

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

For spam filtering purposes, please copy the number 5759 to the field below: