From: Daniel Stenberg Date: Wed, 17 Mar 2021 22:33:12 +0000 (+0100) Subject: docs: clarify timeouts for queued transfers in multi API X-Git-Tag: curl-7_76_0~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=472b537215984cd0d153055a0cd6b3ccc2f387e5;p=thirdparty%2Fcurl.git docs: clarify timeouts for queued transfers in multi API Closes #6758 --- diff --git a/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 b/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 index a655c4695b..bd75fa5921 100644 --- a/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 +++ b/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -44,6 +44,15 @@ pipeline on it. This set limit is also used for proxy connections, and then the proxy is considered to be the host for which this limit counts. + +When more transfers are added to the multi handle than what can be performed +due to the set limit, they will be queued up waiting for their chance. When +that happens, the \fICURLOPT_TIMEOUT_MS(3)\fP timeout will be counted +inclusive of the waiting time, meaning that if you set a too narrow timeout in +such a case the transfer might never even start before it times out. + +Even in the queued up situation, the \fICURLOPT_CONNECTTIMEOUT_MS(3)\fP +timeout is however treated as a per-connect timeout. .SH DEFAULT 0 .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 b/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 index 532cfeb6c3..ad996b251d 100644 --- a/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 +++ b/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -34,7 +34,16 @@ handle. For each new session, libcurl will open a new connection up to the limit set by \fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP. When the limit is reached, the sessions will be pending until there are available connections. If \fICURLMOPT_PIPELINING(3)\fP is enabled, libcurl will try to -pipeline or use multiplexing if the host is capable of it. +use multiplexing if the host is capable of it. + +When more transfers are added to the multi handle than what can be performed +due to the set limit, they will be queued up waiting for their chance. When +that happens, the \fICURLOPT_TIMEOUT_MS(3)\fP timeout will be counted +inclusive of the waiting time, meaning that if you set a too narrow timeout in +such a case the transfer might never even start before it times out. + +Even in the queued up situation, the \fICURLOPT_CONNECTTIMEOUT_MS(3)\fP +timeout is however treated as a per-connect timeout. .SH DEFAULT The default value is 0, which means that there is no limit. It is then simply controlled by the number of easy handles added.