Apache. Документация на русском


Разделы:   1    2    3    4    5    6    7    8    9      10      11    12    13    14    15    16  

Раздел 10. Apache modules

Пункты:   85    86    88    89    90    91    92    93    94    95    96    97    98    99    100    101    102    103    104    105    106    107    108    109    110    111    112    113    114    115    116    117    118    119    120    121    122    123    124    125    126    127    128    129    130    131    132    133    134    135    136    137    138    139    140    141    142    143    144    145    146    147    148    149    150    151    152    153    154    155    156    157    158    159    160    161    163    164    165    166    167    168    170    171    172    173    174    175    176    177    178    179    180    181    182    183    184    185      186      187    188    189    190    191    192    193    194    195    196    197    198    199    200    201    203    204    205    206    207    208    209    210    211    212    213  

 <         > 
RU          EN  

Пункт 186. Apache Module mod_reqtimeout
Description:Set timeout and minimum data rate for receiving requests
Status:Extension
Module Identifier:reqtimeout_module
Source File:mod_reqtimeout.c
Compatibility:Available in Apache HTTPD 2.2.15 and later

Examples

  1. Allow for 5 seconds to complete the TLS handshake, 10 seconds to receive the request headers and 30 seconds for receiving the request body:
    RequestReadTimeout handshake=5 header=10 body=30
  2. 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 (except for the limit given indirectly by LimitRequestBody ):
    RequestReadTimeout body=10,MinRate=1000
  3. Allow at least 10 seconds to receive the request 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 headers:
    RequestReadTimeout header=10-30,MinRate=500
  4. Usually, a server should have both header and body timeouts configured. If a common configuration is used for http and https virtual hosts, the timeouts should not be set too low:
    RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500

RequestReadTimeout Directive

Description:Set timeout values for completing the TLS handshake, receiving the request headers and/or body from client.
Syntax: RequestReadTimeout [handshake=timeout[-maxtimeout][,MinRate=rate] [header=timeout[-maxtimeout][,MinRate=rate] [body=timeout[-maxtimeout][,MinRate=rate]
Default: handshake=0 header=20-40,MinRate=500 body=20,MinRate=500
Context:server config, virtual host
Status:Extension
Module:mod_reqtimeout
Compatibility:Available in version 2.2.15 and later; defaulted to disabled in version 2.3.14 and earlier. The handshake stage is available since version 2.4.29.

This directive can set various timeouts for completing the TLS handshake, receiving the request headers and/or the request body from the client. If the client fails to complete each of these stages within the configured time, a 408 REQUEST TIME OUT error is sent.

For SSL virtual hosts, the handshake timeout values is the time needed to do the initial SSL handshake. If the user's browser is configured to query certificate revocation lists and the CRL server is not reachable, the initial SSL handshake may take a significant time until the browser gives up waiting for the CRL. Therefore the handshake timeout should take this possible overhead into consideration for SSL virtual hosts (if necessary). 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 handshake and header timeouts configured with RequestReadTimeout are only effective after the server process has received the socket.

For each of the three timeout stages (handshake, header or body), there are three ways to specify the timeout:

  • Fixed timeout value:

    stage=timeout

    The time in seconds allowed for completing the whole stage (handshaking, reading all of the request headers or body). A value of 0 means no limit.

  • Disable module for a vhost::

    handshake=0 header=0 body=0

    This disables mod_reqtimeout completely (note that handshake=0 is the default already and could be omitted).

  • Timeout value that is increased when data is received:

    stage=timeout,MinRate=data_rate

    Same as above, but whenever data is received, the timeout value is increased according to the specified minimum data rate (in bytes per second).

  • Timeout value that is increased when data is received, with an upper bound:

    stage=timeout-maxtimeout,MinRate=data_rate

    Same as above, but the timeout will not be increased above the second value of the specified timeout range.



 <         > 

Пункты:   85    86    88    89    90    91    92    93    94    95    96    97    98    99    100    101    102    103    104    105    106    107    108    109    110    111    112    113    114    115    116    117    118    119    120    121    122    123    124    125    126    127    128    129    130    131    132    133    134    135    136    137    138    139    140    141    142    143    144    145    146    147    148    149    150    151    152    153    154    155    156    157    158    159    160    161    163    164    165    166    167    168    170    171    172    173    174    175    176    177    178    179    180    181    182    183    184    185      186      187    188    189    190    191    192    193    194    195    196    197    198    199    200    201    203    204    205    206    207    208    209    210    211    212    213  

Рейтинг@Mail.ru