cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

list_folder returns 504

list_folder returns 504

Walentin
Explorer | Level 3

list_folder with recurcive=true returns 504 Internal server error ;
How it can be? We have only 8k files there ... And how can we solve it? Limit does not help, list each sub-folder is also a bad solution for our app.
thanks for any help

3 Replies 3

Greg-DB
Dropbox Staff

Thanks for the report. This sort of error can occur when these operations take a long time due to a large amount of file activity in the affected account (even if the total number of files at any given time is relatively small).

We'll look into it, but there are a few potential workarounds:

1) Use a smaller 'limit' parameter on /2/files/list_folder. If you specify a smaller value than what you currently have, that should help reduce how long each of these calls takes and reduce the likelihood that they will fail. Note that you supply the 'limit' value to /2/files/list_folder itself, and it will apply to all results from /2/files/list_folder/continue using the returned cursor as well. I know you mentioned trying this already, but please try a lower value.

2) Switch to recursive=False when calling /2/files/list_folder. (Like the above, this follows through to the /2/files/list_folder/continue calls.) This means you would need to call separately for any sub-folder you need though. I know you mentioned this isn't suitable for your scenario, but I'm listing it for completeness in case anyone else has the same issue.

Walentin
Explorer | Level 3

I used limit 1 what can be lower?.. Also I can't undestand how does limit work and what are file's activities? Are those save, update, download, rename and etc?

Greg-DB
Dropbox Staff

Yes, by file activity I am referring to any file changes, such as upload, move, delete, etc.

To clarify, do you still get the 504 error when using a limit of 1? That is the lowest possible value for that.

And just for reference, did you try using recursive=false, and if so, did that eliminate the 504 issue?

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Walentin Explorer | Level 3
What do Dropbox user levels mean?