2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <modulesynopsis metafile="mod_reqtimeout.xml.meta">
25 <name>mod_reqtimeout</name>
26 <description>Set timeout and minimum data rate for receiving requests
28 <status>Extension</status>
29 <sourcefile>mod_reqtimeout.c</sourcefile>
30 <identifier>reqtimeout_module</identifier>
31 <compatibility>Available in Apache 2.2.15 and later</compatibility>
33 <section id="examples"><title>Examples</title>
37 Allow 10 seconds to receive the request including the headers and
38 30 seconds for receiving the request body:
41 RequestReadTimeout header=10 body=30
46 Allow at least 10 seconds to receive the request body.
47 If the client sends data, increase the timeout by 1 second for every
48 1000 bytes received, with no upper limit for the timeout (exept for
49 the limit given indirectly by
50 <directive module="core">LimitRequestBody</directive>):
53 RequestReadTimeout body=10,MinRate=1000
58 Allow at least 10 seconds to receive the request including the headers.
59 If the client sends data, increase the timeout by 1 second for every
60 500 bytes received. But do not allow more than 30 seconds for the
61 request including the headers:
64 RequestReadTimeout header=10-30,MinRate=500
69 Usually, a server should have both header and body timeouts configured.
70 If a common configuration is used for http and https virtual hosts, the
71 timeouts should not be set too low:
74 RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500
82 <name>RequestReadTimeout</name>
83 <description>Set timeout values for receiving request headers and body from client.
85 <syntax>RequestReadTimeout
86 [header=<var>timeout</var>[[-<var>maxtimeout</var>],MinRate=<var>rate</var>]
87 [body=<var>timeout</var>[[-<var>maxtimeout</var>],MinRate=<var>rate</var>]
89 <default>Unset; no limit</default>
90 <contextlist><context>server config</context><context>virtual host</context>
94 <p>This directive can set various timeouts for receiving the request headers
95 and the request body from the client. If the client fails to send headers or
96 body within the configured time, a <code>408 REQUEST TIME OUT</code> error
99 <p>For SSL virtual hosts, the header timeout values include the time needed
100 to do the initial SSL handshake. If the user's browser is configured to
101 query certificate revocation lists and the CRL server is not reachable, the
102 initial SSL handshake may take a significant time until the browser gives up
103 waiting for the CRL. Therefore the header timeout values should not be set
104 to very low values for SSL virtual hosts.
105 The body timeout values include the time needed for SSL renegotiation
108 <p>When an <directive module="core">AcceptFilter</directive> is in use
109 (usually the case on Linux and FreeBSD), the socket is not sent to the
110 server process before at least one byte (or the whole request for
111 <code>httpready</code>) is received. The header timeout configured with
112 <code>RequestReadTimeout</code> is only effective after the server process has
113 received the socket.</p>
115 <p>For each of the two timeout types (header or body), there are three ways
116 to specify the timeout:
121 <li><strong>Fixed timeout value</strong>:<br />
123 <example><var>type</var>=<var>timeout</var></example>
125 <p>The time in seconds allowed for reading all of the request headers or
126 body, respectively. A value of 0 means no limit.</p>
129 <li><strong>Timeout value that is increased when data is
130 received</strong>:<br />
132 <var>type</var>=<var>timeout</var>,MinRate=<var>data_rate</var>
135 <p>Same as above, but whenever data is received, the timeout value is
136 increased according to the specified minimum data rate (in bytes per
140 <li><strong>Timeout value that is increased when data is received, with an
141 upper bound</strong>:<br />
143 <var>type</var>=<var>timeout</var>-<var>maxtimeout</var>,MinRate=<var>data_rate</var>
146 <p>Same as above, but the timeout will not be increased above the second
147 value of the specified timeout range.</p>