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

Forum Discussion

bcd_nyc's avatar
bcd_nyc
Explorer | Level 4
7 years ago

Too many write operations when moving a folder

{"error_summary": "too_many_write_operations/...", "error": {"reason": {".tag": "too_many_write_operations"}}}   I am getting this error when using the V2 API (via PHP & curl) to move a folder with...
  • Greg-DB's avatar
    7 years ago

    The error 'too_many_write_operations', indicates that the operation failed due to "lock contention". This isn't explicit rate limiting, but rather an inability to perform multiple state modifications in the same account at the same time. 

    This can vary over time, based on how much activity is occurring in the account. Note that the simultaneous changes can be from either the app itself, or other clients acting on the account. (E.g., the official Dropbox desktop client, another API app, a Dropbox mobile app, etc.)

    If you haven't already read it, I recommend the data ingress guide, which goes over this in more detail:

    https://www.dropbox.com/developers/reference/data-ingress-guide 

     

    Also, for moving multiple files, it's best to use /2/files/move_batch in order to move multiple at a time:

     

    https://www.dropbox.com/developers/documentation/http/documentation#files-move_batch

     

    This can help avoid lock contention with your own calls (e.g., if you were making multiple calls to the non-batch version) by sending the operations all together. Note that it's always possible that some other client is making changes though, so you should still catch any 429 or 503 and retry the request, respecting the Retry-After header if given in the response, or using an exponential back-off, if not.