bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Meaning of --timeout


From: Tim Rühsen
Subject: Re: Meaning of --timeout
Date: Fri, 14 Aug 2020 15:31:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

The rest of the time is the overall operation of wget.

DNS timeout only applies to DNS lookups - each one must not take longer
than --dns-timeout.

Connect timeout is the max time a connection phase to a server may take.
When connected, the request/response workload begins, consisting of an
arbitrary number of write()s and read()s.

Each read must not take longer than --read-timeout (same goes for writes).

So if you have a read timeout of 10s, in theory (edge case) the download
of 100 bytes can take up almost 1000s if the server sends only single
bytes after 9.99s (so 0.01s before the timeout occurs). On other words:
after each read(), the timeout is reset and starts again with the next
read().

Regards, Tim

On 09.08.20 13:54, Peng Yu wrote:
> I saw that in the man. What are the rest of the time besides dns-time,
> connect-time, read-time? Thanks.
> 
> On Sun, Aug 9, 2020 at 5:50 AM Tim Rühsen <tim.ruehsen@gmx.de
> <mailto:tim.ruehsen@gmx.de>> wrote:
> 
>     Hi,
> 
>     --timeout is explained in `man wget`.
> 
>     In short: it doesn't stop wget after N seconds - it's a shortcut for
>     setting --dns-timeout + --connect-timeout + --read-timeout.
> 
>     For such tasks you can easily use the `timeout` command from GNU
>     coreutils.
> 
>     Regards, Tim
> 
>     On 08.08.20 21:05, Peng Yu wrote:
>     > I want to set the time by which wget must finish. But it seems
>     > --timeout doesn't do so. If I set it to N, wget can not guarantee to
>     > finish in N seconds. Could anybody explain why --timeout can not be
>     > used for this purpose? How to achieve this goal?
>     >
> 
> -- 
> Regards,
> Peng

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]