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 HTTPD 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>header=20-40,MinRate=500 body=20,MinRate=500</default>
90 <contextlist><context>server config</context><context>virtual host</context>
92 <compatibility>Available in version 2.2.15 and later; defaulted to disabled in
93 version 2.3.14 and earlier.</compatibility>
96 <p>This directive can set various timeouts for receiving the request headers
97 and the request body from the client. If the client fails to send headers or
98 body within the configured time, a <code>408 REQUEST TIME OUT</code> error
101 <p>For SSL virtual hosts, the header timeout values include the time needed
102 to do the initial SSL handshake. If the user's browser is configured to
103 query certificate revocation lists and the CRL server is not reachable, the
104 initial SSL handshake may take a significant time until the browser gives up
105 waiting for the CRL. Therefore the header timeout values should not be set
106 to very low values for SSL virtual hosts.
107 The body timeout values include the time needed for SSL renegotiation
110 <p>When an <directive module="core">AcceptFilter</directive> is in use
111 (usually the case on Linux and FreeBSD), the socket is not sent to the
112 server process before at least one byte (or the whole request for
113 <code>httpready</code>) is received. The header timeout configured with
114 <code>RequestReadTimeout</code> is only effective after the server process has
115 received the socket.</p>
117 <p>For each of the two timeout types (header or body), there are three ways
118 to specify the timeout:
123 <li><strong>Fixed timeout value</strong>:<br />
125 <example><var>type</var>=<var>timeout</var></example>
127 <p>The time in seconds allowed for reading all of the request headers or
128 body, respectively. A value of 0 means no limit.</p>
131 <li><strong>Disable module for a vhost:</strong>:<br />
133 <example>header=0 body=0</example>
135 <p>This disables <module>mod_reqtimeout</module> completely.</p>
138 <li><strong>Timeout value that is increased when data is
139 received</strong>:<br />
141 <var>type</var>=<var>timeout</var>,MinRate=<var>data_rate</var>
144 <p>Same as above, but whenever data is received, the timeout value is
145 increased according to the specified minimum data rate (in bytes per
149 <li><strong>Timeout value that is increased when data is received, with an
150 upper bound</strong>:<br />
152 <var>type</var>=<var>timeout</var>-<var>maxtimeout</var>,MinRate=<var>data_rate</var>
155 <p>Same as above, but the timeout will not be increased above the second
156 value of the specified timeout range.</p>