One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
Walentin
7 years agoExplorer | Level 3
list_folder returns 504
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
- 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.- WalentinExplorer | 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?
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 20 minutes ago
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!