2
0

retry.d 1.0 KB

12345678910111213141516171819202122232425
  1. c: Copyright (C) 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. retries 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. When curl is about to retry a transfer, it first waits one second and then for
  18. all forthcoming retries it doubles the waiting time until it reaches 10
  19. minutes which then remains delay between the rest of the retries. By using
  20. --retry-delay you disable this exponential backoff algorithm. See also
  21. --retry-max-time to limit the total time allowed for retries.
  22. curl complies with the Retry-After: response header if one was present to know
  23. when to issue the next retry (added in 7.66.0).