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