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's avatar
deeuu
Explorer | Level 4
7 years ago

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...
  • Greg-DB's avatar
    Greg-DB
    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.