mod_reqtimeout Set timeout and minimum data rate for receiving requests Experimental mod_reqtimeout.c reqtimeout_module Available in Apache 2.3 and later
Examples
  1. Allow 10 seconds to receive the request including the headers and 30 seconds for receiving the request body: RequestTimeout headerinit=10 bodyinit=30
  2. Allow at least 10 seconds to receive the request including the headers. If the client sends data, increase the timeout by 1 second for every 500 bytes received. But do not allow more than 30 seconds for the request including the headers: RequestTimeout headerinit=10 headerminrate=500 headermax=30
  3. Allow at least 10 seconds to receive the request body. If the client sends data, increase the timeout by 1 second for every 1000 bytes received, with no upper limit for the timeout (exept for the limit given indirectly by LimitRequestBody): RequestTimeout bodyinit=10 bodyminrate=1000
RequestTimeout Set timeout values for receiving request headers and body from client. RequestTimeout [headerinit=time [headerminrate=rate [headermax=time]]] [bodyinit=time [bodyminrate=rate [bodymax=time]]] Unset; all values 0 server configvirtual host

This directive can set various timeouts for receiving the request headers and the request body from the client. If the client fails to send headers or body within the configured time, a 408 REQUEST TIME OUT error is sent.

For SSL virtual hosts, the header timeout values include the time needed to do the initial SSL handshake. The body timeout values include the time needed for SSL renegotiation (if necessary).

When an AcceptFilter is in use (usually the case on Linux and FreeBSD), the socket is not sent to the server process before at least one byte (or the whole request for httpready) is received. The header timeout configured with RequestTimeout is only effective after the server process has received the socket.

For the timeout parameters, the value 0 means no limit.

headerinit
The initial timeout for receiving the request headers in seconds. Also the timout for receiving the first byte of the request. If headerminrate is not set, the request line and all headers must be received within this time.
headerminrate
The minimum data rate for receiving the request headers in bytes/second. Whenever data is received, the timeout is increased according to this data rate.
headermax
The maximum timeout for receiving the request headers in seconds. The timeout cannot be increased above this value by headerminrate.
bodyinit
The initial timeout for receiving the request body in seconds. Also the timout for receiving the first byte of the request body. If bodyminrate is not set, the complete request body must be received within this time.
bodyminrate
The minimum data rate for receiving the request body in bytes/second. Whenever data is received, the timeout is increased according to this data rate.
bodymax
The maximum timeout for receiving the request body in seconds. The timeout cannot be increased above this value by bodyminrate