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
Levi2
6 years agoExplorer | Level 3
Internal server error when sharing folders
Hi, is there some kind of limitation with sharing folders? I'm trying to share 5.4k folders and I'm getting
PollError('internal_error', None))
consistently. Sometimes the files share, someti...
- 6 years ago
Thanks for the post, and apologies that the error message isn't more helpful in this case. For this `internal_error` case, I looked it up and I can confirm that it's actually due to "lock contention".
That's a result of how Dropbox works on the backend. It's a technical inability to make multiple modifications, such as sharing a folder, at the same time. The simultaneous activity could be coming from your app itself, or elsewhere, e.g., from the user's desktop client. It can come from the same user, or another member of a shared folder. You can find more information about lock contention here:
https://www.dropbox.com/developers/reference/data-ingress-guide
In short, to avoid this error, you should avoid making multiple concurrent state modifications. E.g., don't issue multiple such requests at a time, and use batch endpoints whenever possible. That won't guarantee that you won't run in to this error though, as contention can still come from other sources, so you may also want to implement automatic retries in your app. For this particular scenario of sharing multiple folders, I also recommend adding a delay between the consecutive share operations, which can help in certain cases.
I'll send this along as a request to the team to improve the error reporting.
Greg-DB
6 years agoDropbox Staff
Thanks for the post, and apologies that the error message isn't more helpful in this case. For this `internal_error` case, I looked it up and I can confirm that it's actually due to "lock contention".
That's a result of how Dropbox works on the backend. It's a technical inability to make multiple modifications, such as sharing a folder, at the same time. The simultaneous activity could be coming from your app itself, or elsewhere, e.g., from the user's desktop client. It can come from the same user, or another member of a shared folder. You can find more information about lock contention here:
https://www.dropbox.com/developers/reference/data-ingress-guide
In short, to avoid this error, you should avoid making multiple concurrent state modifications. E.g., don't issue multiple such requests at a time, and use batch endpoints whenever possible. That won't guarantee that you won't run in to this error though, as contention can still come from other sources, so you may also want to implement automatic retries in your app. For this particular scenario of sharing multiple folders, I also recommend adding a delay between the consecutive share operations, which can help in certain cases.
I'll send this along as a request to the team to improve the error reporting.
- Levi26 years agoExplorer | Level 3
Thanks for the links.
This makes sense since I was trying to share thousands of folders. However, I avoided multi-threading and no one else is using this folder since it's a test folder.
It seems that namespace locking is the culprit since all of the folders are in the same name space and I'm using force_asyn=True leaving when the folder actually gets shared up to dropbox.
I know that there are batch endpoints for uploading data, but are there batch endpoints for sharing folders?
- Greg-DB6 years agoDropbox Staff
No, unfortunatelty there isn't a batch option for sharing folders in particular, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,911 PostsLatest Activity: 7 hours 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!