Apache Module mod_reqtimeout

Available Languages: en

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 2.2.15 and later

Examples

  1. Allow 10 seconds to receive the request including the headers and 30 seconds for receiving the request body:

    RequestReadTimeout 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 (exept for the limit given indirectly by LimitRequestBody):

    RequestReadTimeout body=10,MinRate=1000

  3. Allow at least 10 seconds to receive the request including the 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 including the 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 receiving request headers and body from client.
Syntax: RequestReadTimeout [header=timeout[[-maxtimeout],MinRate=rate] [body=timeout[[-maxtimeout],MinRate=rate]
Default: Unset; no limit
Context: server config, virtual host
Status: Extension
Module: mod_reqtimeout

This directive can set various timeouts for receiving the request headers and the request body from the client. If the client fails to send headers or body within the configured time, a 408 REQUEST TIME OUT error is sent.

For SSL virtual hosts, the header timeout values include 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 header timeout values should not be set to very low values for SSL virtual hosts. 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 header timeout configured with RequestReadTimeout is only effective after the server process has received the socket.

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

  • Fixed timeout value:

    type=timeout

    The time in seconds allowed for reading all of the request headers or body, respectively. A value of 0 means no limit.

  • Timeout value that is increased when data is received:

    type=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:

    type=timeout-maxtimeout,MinRate=data_rate

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

Available Languages: en

Comments

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to ourmailing lists.

RSS   Log in / register

Anonymous 431 days ago Rating: 0 (register an account in order to rate comments)

Some third party modules that require an active connection, like apache-websockets, will fail due module. These connections could be sleeping for a time and when they wake up, the timeout close the connection.

covener 431 days ago Rating: 0 (register an account in order to rate comments)

Seems fixable via a some small pseudo-API (connection level note) to mark the conn as n/a for end to end mod_reqtimeout.

Apache Module mod_reqtimeout的更多相关文章

  1. Apache Module mod_ssl

    http://httpd.apache.org/docs/current/mod/mod_ssl.html Description: Strong cryptography using the Sec ...

  2. 关于Slow HTTP Denial of Service Attack slowhttptest的几种慢攻击DOS原理

    关于Slow HTTP Denial of Service Attack  slowhttptest的几种慢攻击DOS原理 http://www.myhack58.com/Article/60/sor ...

  3. Apache Error: Invalid command ‘Allow’, perhaps misspelled or defined by a module not included in the server configuration

    在一个Window Server 2008R2系统上使用Apache架设了一个PHP的网站项目 在配置Apache的过程中出现了以下问题   根据上面的提示说是没有相应的权限,那就在虚拟主机里进行了配 ...

  4. Apache部署django项目

    在此之前,我们一直使用django的manage.py 的runserver 命令来运行django应用,但这只是我们的开发环境,当项目真正部署上线的时候这做就不可行了,必须将我们的项目部署到特定的w ...

  5. tomcat apache 实现负载平衡的小demo

    软件:1个apache,2个tomcat module包:mod_jk.so(下载地址:http://tomcat.apache.org/download-connectors.cgi) 下载文件解压 ...

  6. mac攻略(五) -- 使用brew配置php7开发环境(mac+php+apache+mysql+redis)

    前面介绍过基本的配置,后来我又从网上查找了很多资料,经过不断的摸索,下面做了一个总结,希望能对大家提供些许帮助(Mac版本是sierra)   一.mac系统会自带git,而我们要做的是自己安装git ...

  7. What is the difference Apache (Http Server) and Tomcat (Servlet Container)

    The Apache Project The Apache Project is a collaborative software development effort. Its goal is to ...

  8. php在apache中一共有三种工作方式:CGI模式、FastCGI模式、Apache 模块DLL

    php在apache中一共有三种工作方式:CGI模式.FastCGI .FastCGI是什么? FastCGI是语言无关的.可伸缩架构的CGI开放扩展,其主要行 为是将CGI解释器进程保持在内存中并因 ...

  9. 【转】终于解决了Apache乱码问题

    之前开放了一个空间,给网友提供电台节目音频下载.由于多年节目的文件数量甚多,且分类没有特定格式,图省事,没有制作网页提供分类下载,而是直接利用Apache的目录浏览功能,简单直观. 不过,所在的美国服 ...

随机推荐

  1. 快速部署一个Kubernetes集群

    官方提供的三种部署方式 minikube Minikube是一个工具,可以在本地快速运行一个单点的Kubernetes,仅用于尝试Kubernetes或日常开发的用户使用. 部署地址:https:// ...

  2. C6 C7的开机启动流程

    C6开机启动流程 1.内核引导,加电自检(通电后检查内核):检查bios的配置,检测硬件 装好系统之后才会进行以下内容 MBR 引导 (3.2.1...) GRUB菜单 (选择不同的系统)(按e,进入 ...

  3. java的基础知识01

    来自<head first java>书籍的摘录

  4. muduo网络库源码学习————日志滚动

    muduo库里面的实现日志滚动有两种条件,一种是日志文件大小达到预设值,另一种是时间到达超过当天.滚动日志类的文件是LogFile.cc ,LogFile.h 代码如下: LogFile.cc #in ...

  5. libevent(七)信号事件监听

    libevent通过socketpair实现对信号事件的监听. 还记得event_base吗? struct event_base { struct evsig_info sig; // 略 }; e ...

  6. 网络流 A - PIGS POJ - 1149 最大流

    A - PIGS POJ - 1149 这个题目我开始感觉很难,然后去看了一份题解,写的很好 https://wenku.baidu.com/view/0ad00abec77da26925c5b01c ...

  7. Linux权限管理、系统进程管理

    权限管理 linux系统中分为四种角色 u=user 当前用户   g=group 同组用户   o=other 其他用户   a=all 代表所有用户 三种权限 r=read 可读 w=write ...

  8. # C#学习笔记(一)——准备工作

    C#学习笔记(一)--准备工作 目录 C#学习笔记(一)--准备工作 1.1 下载安装.NET框架 1.2 创建源代码 1.3 一些基本名称 1.4 简单的命名建议 1.1 下载安装.NET框架 .N ...

  9. 自己动手写RPC

    接下来2个月 给自己定个目标 年前  自己动手做个RPC 框架 暂时技术选型  是 dotcore + netty + zookeeper/Consul

  10. NLTK的安装与简单测试

    1.NLTK简介 Natural Language Toolkit,自然语言处理工具包,在NLP领域中,最常使用的一个Python库.NLTK是一个开源的项目,包含:Python模块,数据集和教程,用 ...