HTTP客户端超时和服务器超时 [英] HTTP client timeout and server timeout

查看:1770
本文介绍了HTTP客户端超时和服务器超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据这个问题:哪里可以我找到所有浏览器的默认超时设置?每个浏览器都有超时的默认设置

According to this question: Where can I find the default timeout settings for all browsers? each every browser has a default setting for time out

检查<$ c后Firefox17中的默认超时$ c> about:config 是115s。但是我已经测试过运行一些我定时的请求,它在> 150秒后返回了一个请求。

The default timeout in Firefox17, after checking about:config is 115s. However I have tested to run some request in which I timed and it returned a request after >150~ seconds.

所以我想知道它是如何工作的,不应该是Firefox之前已超时?

So I wonder how does it works, shouldn't Firefox have timed out before?

推荐答案

有多种形式的超时,你是在连接超时,请求超时或生存时间之后( TCP连接停止之前的时间。)

There's many forms of timeout, are you after the connection timeout, request timeout or time to live (time before TCP connection stops).

Firefox上的默认 TimeToLive 是115s(network.http.keep-alive.timeout)

The default TimeToLive on Firefox is 115s (network.http.keep-alive.timeout)

Firefox上的默认连接超时为250s(network.http.connection-retry-timeout)

The default connection timeout on Firefox is 250s (network.http.connection-retry-timeout)

Firefox的默认请求超时为30秒(network.http.pipelining.read-timeout)。

The default request timeout for Firefox is 30s (network.http.pipelining.read-timeout).

所需的时间做一个HttpRequest取决于是否已建立连接,这必须在250s之内,我猜你不是在追求。您可能在请求超时之后,我认为是30,000ms(30s),所以最后我会说它是超时的连接时间,这就是为什么你在~150s后得到回复的原因虽然我还没有真正测试过这个。

The time it takes to do an HttpRequest depends on if a connection has been made this has to be within 250s which I'm guessing you're not after. You're probably after the request timeout which I think is 30,000ms (30s) so to conclude I'd say it's timing out with a connection time out that's why you got a response back after ~150s though I haven't really tested this.

这篇关于HTTP客户端超时和服务器超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆