【问题标题】:What is the maximum possible Apache HTTP TimeOut directive?Apache HTTP TimeOut 指令的最大可能值是多少?
【发布时间】:2020-04-30 09:30:50
【问题描述】:

Apache2 Web 服务器允许在 httpd.conf 或 apache2.conf(在服务器配置或 vhost 配置中)中的 TimeOut 指令的最大可能值是多少,而不返回默认值?

编辑:澄清一下,我所说的“恢复默认值”是什么意思。

似乎当超过指令的上限时,定义 TimeOut 的值将恢复为 300。例如将 TimeOut 设置为 1800(秒),服务器将继续保持请求处于活动状态30分钟成功。然而,如果您将 TimeOut 设置为 31536000(秒)或 1 年,服务器将恢复或故障恢复为默认值 300(秒),并且仅保持请求活动 5 分钟。

参考资料:

http://httpd.apache.org/docs/2.0/mod/core.html#timeout 默认设置为 300(秒)

【问题讨论】:

  • 你说“没有故障恢复到默认值”是什么意思?

标签: apache http timeout max httpd.conf


【解决方案1】:

虽然我不确定我是否理解您所说的“没有故障恢复到默认值?”的意思,但我假设您正在尝试确定 Apache 超时指令的上限.我不相信org.apache.hc.core5.util.Timeout 对其值施加上限。如果查看Timeout 的源代码,您会注意到timeout 参数值是Java longs。例如 -

    public static Timeout of(final long duration, final TimeUnit timeUnit) {
        return new Timeout(duration, timeUnit);
    }

所以我认为该指令的上限理论上是 Java long 的上限。

也就是说,请澄清你的意思 - “没有失败回到默认值?

【讨论】:

  • 请查看最新编辑以澄清您的问题
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-02-05
  • 2010-12-03
  • 1970-01-01
  • 2010-11-20
  • 1970-01-01
  • 1970-01-01
  • 2011-01-26
相关资源
最近更新 更多