You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cf r2 objects put --file fails with "timeout" on a 264 MB file (50 MB works) #73
Exit code 1, and the object is not in the bucket afterwards (GET returns 404). The same command with a 1 MB and a 50 MB file of random bytes succeeds, and reading them back gives identical content. The command's help gives a 300 MB limit, so 264 MB should be accepted. wrangler r2 object put --remote uploads this same file size fine in our CI.
Repro
head -c 264177556 /dev/urandom > big.bin
cf r2 objects put probe/big.bin --bucket-name <bucket> --file big.bin
Expected
Uploads up to the documented 300 MB succeed, or the request timeout scales with file size or can be configured.
Still happening on 1.0.0-beta.7 (macOS). It depends on upload time rather than size: on a slower uplink, a 50 MB file of random bytes also fails after about 30 seconds with the same bare timeout error, while a 5-byte file succeeds.
head -c 50000000 /dev/urandom > r2-50m.bin
cf r2 objects put r2-50m.bin --bucket-name <bucket> --file r2-50m.bin --content-type application/octet-stream
# fails after 30.4 s: "An unexpected error occurred / timeout"
The bundled client appears to default every API request to 30 seconds (timeoutInSeconds: (e.timeout ?? 3e4) / 1e3 in dist/auth-*.mjs), and neither cf r2 objects put --help nor the global flags expose a way to raise it. A --timeout flag, or a timeout that scales with the body size for uploads, would make the documented 300 MB limit reachable. It would also help if the error said which timeout was hit and how long it was.
Activity
edgariscoding commentedon Sep 30, 2026
Still happening on 1.0.0-beta.7 (macOS). It depends on upload time rather than size: on a slower uplink, a 50 MB file of random bytes also fails after about 30 seconds with the same bare
timeouterror, while a 5-byte file succeeds.The bundled client appears to default every API request to 30 seconds (
timeoutInSeconds: (e.timeout ?? 3e4) / 1e3indist/auth-*.mjs), and neithercf r2 objects put --helpnor the global flags expose a way to raise it. A--timeoutflag, or a timeout that scales with the body size for uploads, would make the documented 300 MB limit reachable. It would also help if the error said which timeout was hit and how long it was.