git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] Timeouts on HTTP requests

From
NHNick Hengeveld <nickh@reactrix.com>
Date
Oct 19, 2005, 15:34 UTC
Message-ID
<20051019153405.GP5509@reactrix.com>
In-Reply-To
<20051019110909.GO30889@pasky.or.cz>
On Wed, Oct 19, 2005 at 01:09:10PM +0200, Petr Baudis wrote:
Show 5 quoted lines
> > On the other hand, having _no_ activity for say 30 seconds would
> > indicate a dead link on either modem or localnet.
> 
> I agree that we should definitely use timeout instead of some low speed
> limit - can't curl do that?

Curl lets you set timeouts for the connect and the overall request, but neither of these are related to activity. In our case, some of the files we transfer can be quite large and need to transfer over a 56K modem line. As long as data is moving, we're happy; but we need the transfer to abort if the connection drops and data stops moving completely.

> But 30 seconds is too little (on bad links, I've seen TCP connections
> stalled for much longer), I would use at least 120 seconds. Or perhaps
> 30 seconds, but retry three times or so.

I've been testing with low speed limit of 1 and low speed time of 300 - if data transfer stays below 1 byte/sec for 5 minutes, curl aborts the transfer.

I like Junio's suggestion regarding defaults though, don't compile them in but let default config templates take care of it.

-- 
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.
Previous: Petr Baudis
Message 4 of 4 in “[RFC] Timeouts on HTTP requests”
  1. Nick HengeveldOct 18, 2005
  2. Junio C HamanoOct 19, 2005
  3. Petr BaudisOct 19, 2005
  4. Nick HengeveldOct 19, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.