We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

Levi2's avatar
Levi2
Explorer | Level 3
6 years ago

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...
  • Greg-DB's avatar
    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.