A debian lenny server, running apache httpd 2.2.11 and fastcgi, kills requests when they take more than a certain amount of seconds. I want to disable this timeout to enable me to debug an application that is launched using fastcgi.

I've searched in both apache and lighttpd documentation, but couldn't find anything (only options like idle-timeout, that isn't the case here, I think).

Anyone knows how to control this timeout? Thanks.

2 Answers 2


Looks like you want one of the FastCGI directives: FastCGIServer, FastCGIConfig, or FastCgiExternalServer, depending. FastCGIConfig affects all FastCGI applications; the other two are per-application. You'll want one of these options (check the docs to be sure which is appropriate):

-appConnTimeout n (0 seconds)
Unix: The number of seconds to wait for a connection to the FastCGI application to complete or 0 to indicate a blocking connect() should be used. Blocking connect()s have an OS dependent internal timeout. If the timeout expires, a SERVER_ERROR results. For non-zero values, this is the amount of time used in a select() to write to the file descriptor returned by a non-blocking connect(). Non-blocking connect()s are troublesome on many platforms. See also -idle-timeout, it produces similar results but in a more portable manner.
Windows NT: TCP based applications work as above. Named pipe based applications (static applications configured without the -port option and dynamic applications) use this value successfully to limit the amount of time to wait for a connection (i.e. it's not "troublesome"). By default, this is 90 seconds (FCGI_NAMED_PIPE_CONNECT_TIMEOUT in mod_fastcgi.h).

-idle-timeout n (30 seconds)
The number of seconds of FastCGI application inactivity allowed before the request is aborted and the event is logged (at the error LogLevel). The inactivity timer applies only as long as a connection is pending with the FastCGI application. If a request is queued to an application, but the application doesn't respond (by writing and flushing) within this period, the request will be aborted. If communication is complete with the application but incomplete with the client (the response is buffered), the timeout does not apply.

-min-server-life n (30)
The minimum number of seconds the application must run for before its restart interval is increased to 600 seconds. The server will get 3 tries to run for at least this number of seconds.

  • I've already tried that, without success! No matter what I do, the request is killed in 30 seconds.
    – Kknd
    Commented Nov 3, 2009 at 13:46
  • which one are you setting it on? have you tried using FastCGIConfig -idle-timeout 600 or similar to affect the overall module? Commented Nov 3, 2009 at 13:55
  • Well, passing the -idle-timeout (misleading name) directly to the launcher solved the problem.
    – Kknd
    Commented Nov 4, 2009 at 18:21

In Apache the directive you want is Timeout. On some distros it defaults to 300 or so. Many people have started lowering this to mitigate "Slowloris"-type attacks.

Timeout 10

Should be able to set it right up to 10 minutes, if you want:

Timeout 600

You must log in to answer this question.

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