You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
Győző C.
9 years agoExplorer | Level 3
Parallel file upload fails
My app uses core api v1. When I try to upload 10+ files into my dropbox account, a few of them randomly fails with response:
[..]
<head><title>Dropbox - 403</title>
<link href="//www.dropbox.com/static/css/error.css" rel="stylesheet" type="text/css"/>
[..]
It does not occur when uploading a single file.
- Greg-DBDropbox Staff
A 403 error with an HTML body is unexpected when using the API. Can you share some sample code that reproduces this? Thanks in advance!
- Győző C.Explorer | Level 3
My bad, the 403 response was not for these requests. However some files are still missing. It can be reproduced with this:
#!/bin/bash
for i in `seq 10 19`;
do
curl -H "Authorization: Bearer <my token>" https://api-content.dropbox.com/1/files_put/auto/ -T file$i &
done;Now I can see that the response for the missing files is:
{"error": "Failed to grab locks for 532934897: lock held by connection 4695316.Please re-issue the request."}
Is there a queue I can use on your side for file upload? Else I guess I have to check the response and retry if necessary. Thanks!
- Greg-DBDropbox Staff
That error can occur in some cases, in which case the response status code will be 503. If the response status code is non-200, you should consider the upload failed.
This error generally indicates that there was simultaneous activity in the account preventing your app from making the state-modifying call (e.g., adding or removing files) it is attempting. The simultaneous activity could be coming from your app itself, or elsewhere, e.g., from a user's desktop client.
You can't queue these on our side, so the best practice is to reduce the number of simultaneous requests and to just retry a request, respecting the Retry-After header if given, or after a small delay possibly with an exponential back-off, when receiving this error.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,911 PostsLatest Activity: 43 minutes agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!