Forum Discussion

skysync's avatar
skysync
Explorer | Level 3
8 years ago

delete_batch returns internal error consistently when deleting more than 3425 files

I was using the delete API call to remove a folder that contained more than 10k files when I saw the too_many_files error.  I switched over to the delete_batch API call in order to bypass this error, but received the same error at 10,001 files.  I decided to send smaller chunks, but when trying to use delete_batch with more than 3425 files, I consistently get an internal error reported.  When I reduced the number of files to be sent to the delete_batch API call to 3422, I was successful in deleting 3422 files the first go around, then received the internal error for any subsequent calls to delete_batch.  I'm having a hard time writing reliable code to this endpoint without fully understanding it's limits and don't want to resort to deleting files one at a time since this will take much longer.  This code was being used for performance testing and the issue first documented when deleting a folder with 100k files.  

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    Thanks for the report! We do unfortunately currently return internal_error when a more specific error would be more helpful. I'm sending this along to the team, but I can't make any promises as to if/when this would be improved.

    If you share the job ID though, I may be able to look into it and share some information as to the specific issue. (Or, feel free to open an API ticket here if you'd prefer to share privately: https://www.dropbox.com/developers/contact )
    • skysync's avatar
      skysync
      Explorer | Level 3

      Hi, here's a job ID to look into: dbjid:AABmns5UvrGc8_P9u_aHxWgCafbeZL1ejUfh1LaMShLO2s-gLpFA8wKeNJ_CtWUufwrTWwQ6d1m4ylYsIOvR5Mq6

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff
        Thanks! I'm looking into it. When you called /2/files/delete_batch/check for this one in particular though, can you confirm if you got a response body containing a internal_error, or did you actually just get a 500 on the call itself?

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,949 PostsLatest Activity: 3 minutes ago
352 Following

If 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!