blob: 080825bf8e1dbcf1d1c2e5257831676b10681114 [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001c: Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
2SPDX-License-Identifier: curl
3Long: retry
4Arg: <num>
5Added: 7.12.3
6Help: Retry request if transient problems occur
7Category: curl
8Example: --retry 7 $URL
9See-also: retry-max-time
10Multi: single
11---
12If a transient error is returned when curl tries to perform a transfer, it
13will retry this number of times before giving up. Setting the number to 0
14makes curl do no retries (which is the default). Transient error means either:
15a timeout, an FTP 4xx response code or an HTTP 408, 429, 500, 502, 503 or 504
16response code.
17
18When curl is about to retry a transfer, it will first wait one second and then
19for all forthcoming retries it will double the waiting time until it reaches
2010 minutes which then will be the delay between the rest of the retries. By
21using --retry-delay you disable this exponential backoff algorithm. See also
22--retry-max-time to limit the total time allowed for retries.
23
24Since curl 7.66.0, curl will comply with the Retry-After: response header if
25one was present to know when to issue the next retry.