]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_reqtimeout.xml
mod_reqtimeout: Change the default to set some reasonable timeout values if loaded
[apache] / docs / manual / mod / mod_reqtimeout.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
5
6 <!--
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
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
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.
21 -->
22
23 <modulesynopsis metafile="mod_reqtimeout.xml.meta">
24
25 <name>mod_reqtimeout</name>
26 <description>Set timeout and minimum data rate for receiving requests
27 </description>
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>
32
33 <section id="examples"><title>Examples</title>
34
35     <ol>
36       <li>
37         Allow 10 seconds to receive the request including the headers and
38         30 seconds for receiving the request body:
39
40         <example>
41           RequestReadTimeout header=10 body=30
42         </example>
43       </li>
44
45       <li>
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>):
51
52         <example>
53           RequestReadTimeout body=10,MinRate=1000
54         </example>
55       </li>
56
57       <li>
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:
62
63         <example>
64           RequestReadTimeout header=10-30,MinRate=500
65         </example>
66       </li>
67
68       <li>
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:
72
73         <example>
74           RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500
75         </example>
76       </li>
77
78     </ol>
79 </section>
80
81 <directivesynopsis>
82 <name>RequestReadTimeout</name>
83 <description>Set timeout values for receiving request headers and body from client.
84 </description>
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>]
88 </syntax>
89 <default>header=20-40,MinRate=500 body=20,MinRate=500</default>
90 <contextlist><context>server config</context><context>virtual host</context>
91 </contextlist>
92 <compatibility>Available in version 2.2.15 and later; defaulted to disabled in
93 version 2.3.14 and earlier.</compatibility>
94
95 <usage>
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
99     is sent.</p>
100
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
108     (if necessary).</p>
109
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>
116
117     <p>For each of the two timeout types (header or body), there are three ways
118     to specify the timeout:
119     </p>
120
121     <ul>
122
123     <li><strong>Fixed timeout value</strong>:<br />
124
125     <example><var>type</var>=<var>timeout</var></example>
126
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>
129     </li>
130
131     <li><strong>Disable module for a vhost:</strong>:<br />
132
133     <example>header=0 body=0</example>
134
135     <p>This disables <module>mod_reqtimeout</module> completely.</p>
136     </li>
137
138     <li><strong>Timeout value that is increased when data is
139     received</strong>:<br />
140     <example>
141     <var>type</var>=<var>timeout</var>,MinRate=<var>data_rate</var>
142     </example>
143
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
146     second).</p>
147     </li>
148
149     <li><strong>Timeout value that is increased when data is received, with an
150     upper bound</strong>:<br />
151     <example>
152     <var>type</var>=<var>timeout</var>-<var>maxtimeout</var>,MinRate=<var>data_rate</var>
153     </example>
154
155     <p>Same as above, but the timeout will not be increased above the second
156     value of the specified timeout range.</p>
157     </li>
158
159     </ul>
160
161 </usage>
162
163 </directivesynopsis>
164
165 </modulesynopsis>