dropbox / dbxcli

A command line client for Dropbox built using the Go SDK
Other
1.05k stars 101 forks source link

Receiving Error: too_many_requests/. when trying to PUT a file #149

Open thestick613 opened 3 years ago

thestick613 commented 3 years ago
/root/dbxcli/dbxcli-linux-amd64 put testfile.txt "/path to/some folder/testfile.txt"
Uploading 6 B/6 B
Error: too_many_requests/.
jaraco commented 2 months ago

I ran into this error too, when putting a large file. I'd previously succeeded in putting a 96GB file. I'm now putting a 56GB file and part way through the upload, I got the error:

2024/06/19 13:36:32 sdk.go:94: req: &{POST https://content.dropboxapi.com/2/files/upload_session/append_v2 HTTP/1.1 1 1 map[Content-Type:[application/octet-stream] Dropbox-Api-Arg:[{"cursor":{"session_id":"pid_upload_session:<elided>","offset":7650410496},"close":false}]] {0xc0004dc260} <nil> 0 [] false content.dropboxapi.com map[] map[] <nil> map[]   <nil> <nil> <nil> <nil>}
2024/06/19 13:36:37 sdk.go:94: resp: &{429 Too Many Requests 429 HTTP/2.0 2 0 map[Cache-Control:[no-cache] Retry-After:[15] Server:[envoy] X-Dropbox-Response-Origin:[far_remote] X-Dropbox-Request-Id:[4d3a894ee51f45f4a6dd469069ec3285] Content-Type:[application/json] Content-Security-Policy:[sandbox allow-forms allow-scripts] X-Content-Type-Options:[nosniff] Date:[Wed, 19 Jun 2024 17:36:37 GMT] Content-Length:[113] Strict-Transport-Security:[max-age=31536000; includeSubDomains; preload] X-Robots-Tag:[noindex, nofollow, noimageindex]] 0xc0004dc3a0 113 [] false false map[] 0xc0004ea200 0xc0001e0210}
2024/06/19 13:36:37 sdk.go:94: body: {"error_summary": "too_many_requests/...", "error": {"reason": {".tag": "too_many_requests"}, "retry_after": 15}}
Error: too_many_requests/...

The client should automatically handle these errors, wait the indicated time, and retry.