]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_reqtimeout.xml
Mark some modules/directives non-experimental:
[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 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>Unset; no limit</default>
90 <contextlist><context>server config</context><context>virtual host</context>
91 </contextlist>
92
93 <usage>
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
97     is sent.</p>
98
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
106     (if necessary).</p>
107
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>
114
115     <p>For each of the two timeout types (header or body), there are three ways
116     to specify the timeout:
117     </p>
118
119     <ul>
120
121     <li><strong>Fixed timeout value</strong>:<br />
122
123     <example><var>type</var>=<var>timeout</var></example>
124
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>
127     </li>
128
129     <li><strong>Timeout value that is increased when data is
130     received</strong>:<br />
131     <example>
132     <var>type</var>=<var>timeout</var>,MinRate=<var>data_rate</var>
133     </example>
134
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
137     second).</p>
138     </li>
139
140     <li><strong>Timeout value that is increased when data is received, with an
141     upper bound</strong>:<br />
142     <example>
143     <var>type</var>=<var>timeout</var>-<var>maxtimeout</var>,MinRate=<var>data_rate</var>
144     </example>
145
146     <p>Same as above, but the timeout will not be increased above the second
147     value of the specified timeout range.</p>
148     </li>
149
150     </ul>
151
152 </usage>
153
154 </directivesynopsis>
155
156 </modulesynopsis>