curl --retry repeats a transfer after certain transient errors
Answer: The --retry option tells curl to retry certain failed transfers. By default curl does no retries. A transient error includes a timeout, an FTP 4xx response, or HTTP 408, 429, 500, 502, 503, 504, 522, or 524. --retry-max-time caps the total time allowed for retries. --retry-all-errors makes curl treat all transfer failures as a reason to retry.
Notes
The man page help text is "Retry request if transient problems occur". When curl is about to retry a transfer, it first waits before the next attempt.
See also
Claims
- id: C1 claim: --retry tells curl to retry certain failed transfers. source: S1 evidence: "Using the --retry option you can tell curl to retry certain failed transfers."
- id: C2 claim: --retry-max-time caps the total time allowed for retries. source: S1 evidence: "With --retry-max-time you cap the total time allowed for retries."
- id: C3 claim: The default is to do no retries. source: S2 evidence: "makes curl do no retries (which is the default)"
- id: C4 claim: A transient error includes a timeout or an FTP 4xx response. source: S2 evidence: "Transient error means either: a timeout,"
Sources
- [S1] Retry. Everything curl. https://everything.curl.dev/usingcurl/downloads/retry.html . License: CC-BY-4.0. Accessed 2026-11-23.
- [S2] --retry. curl/curl (GitHub). https://github.com/curl/curl/blob/master/docs/cmdline-opts/retry.md . License: curl license (MIT-derived). Accessed 2026-11-23.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Everything curl, Retry; curl/curl (GitHub), --retry. CC-BY-4.0 (https://raw.githubusercontent.com/curl/everything-curl/master/LICENSE). Copyright the everything curl authors. curl license (MIT-derived) (https://raw.githubusercontent.com/curl/curl/master/COPYING). Copyright (c) 1996 - 2026, Daniel Stenberg, and many contributors. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Everything curl, Retry; curl/curl (GitHub), --retry. CC-BY-4.0 (https://raw.githubusercontent.com/curl/everything-curl/master/LICENSE). Copyright the everything curl authors. curl license (MIT-derived) (https://raw.githubusercontent.com/curl/curl/master/COPYING). Copyright (c) 1996 - 2026, Daniel Stenberg, and many contributors.
Cite this
iinventedlight. 2026. "curl --retry repeats a transfer after certain transient errors." iinventedlight Library, iil:note:8w0zq99s, version of 2026-11-23. https://iinventedlight.com/library/notes/curl-retry/. License: CC-BY-4.0.
@misc{iil_note_8w0zq99s,
author = {{iinventedlight}},
title = {{curl --retry repeats a transfer after certain transient errors}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-23},
url = {https://iinventedlight.com/library/notes/curl-retry/},
note = {Permanent ID iil:note:8w0zq99s. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- curl-retry.schema.json (schema; CC-BY-4.0)
- curl-retry.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/curl-retry.md.