You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
deeuu
7 years agoExplorer | Level 4
list_folder_continue -> 504 errors
Hello, I'm using `list_folder_continue` of the Python SDK to recursively traverse (via pagination) a folder with a very large number of files (hundreds of thousands). After a while, I'm running int...
- 7 years ago
Thanks for the report! This can be related to these operations taking a long time due to a large number of files and/or a large amount of file activity in the affected account(s).
We'll look into it, but there are a few potential workarounds:
1) Use the 'limit' parameter on files_list_folder:
https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.dropbox.Dropbox.files_list_folder
If you specify a smaller value (the default is effectively around 2000), 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 files_list_folder itself, and it will apply to all results from files_list_folder_continue using the returned cursor as well.2) If you are using recursive=True, switch to recursive=False when calling files_list_folder. This means you would need to make a call for each sub-folder you need though.
NathanA
New member | Level 2
Hello, any updates on this issue ? The issue is not solved, we still face this issue
kylea
3 years agoDropbox Staff
In addition to the techniques mentioned in this thread, I would also suggest traversing with include_mounted_folders=false.
Mounted folders refer to folder shares or team folders. With that option, the mount point (shared folder id) is still returned in the output, but not the share's content. You could then traverse the share independently with a different cursor.
This is particularly helpful for large team folders or scenarios with a lot of large shares.
We have updated our reference guides with best practices since this thread started, check them out here.
I don't have a specific update on the 504 error the original poster mentioned - are you seeing the 504 code, or something else? Including a little more detail on the error response you're seeing may help.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,916 PostsLatest Activity: 2 hours 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!