Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP client timeout and server timeout

Tags:

http

request

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

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.

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

like image 836
starcorn Avatar asked Nov 27 '12 10:11

starcorn


People also ask

What is the default timeout for HTTP client?

The default value is 100,000 milliseconds (100 seconds).

What is HTTP timeout?

The HyperText Transfer Protocol (HTTP) 408 Request Timeout response status code means that the server would like to shut down this unused connection. It is sent on an idle connection by some servers, even without any previous request by the client.

What is a client timeout?

Client timeouts, also called idle timeouts, occur when a client is disconnected from a Relay server after being inactive for longer than the 10 second TTL value. A TTL value, or time to live value, is a mechanism that limits the lifetime of idle connections to a Relay server.

How long is HTTP request timeout?

The default value is 60 seconds. If the value of this stanza entry is set to 0 (or not set), connection timeouts between data fragments are governed instead by the client-connect-timeout stanza entry. The exception to this rule occurs for responses returned over HTTP (TCP).


2 Answers

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

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

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

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

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.

like image 97
alex.p Avatar answered Sep 17 '22 00:09

alex.p


According to https://bugzilla.mozilla.org/show_bug.cgi?id=592284, the pref network.http.connection-retry-timeout controls the amount of time in ms (Milliseconds !) to wait for success on the initial connection before beginning the second one. Setting it to 0 disables the parallel connection.

like image 34
Juergen Avatar answered Sep 18 '22 00:09

Juergen