Forum Discussion

Crimson's avatar
Crimson
Explorer | Level 3
7 years ago

Time out for 250 MB file download

Below code getting terminated with error: Read timed out. (read timeout=30) for 250MB file

 

import dropbox
dbx = dropbox.Dropbox("TokenId")

print "download started"
md, zipFile = dbx.files_download_zip("Filepath")
writer = open("download/Test.zip", 'wb')
writer.write(zipFile.content)
writer.close()

 

2 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    7 years ago

    Thanks for the report! For large amounts of data, it is possible that the server may not respond in time before the client times out. I'll ask the team to look into how we might be able to improve this.

     

    To try to work around this though, you can make a client without the client timeout like this:

     

    dbx = dropbox.Dropbox("<ACCESS_TOKEN>", timeout=None)

    It's still possible for the call to fail though, so I can't guarantee that will make it work.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    7 years ago
    We've released an optimization for this endpoint, so it should now respond quicker. You can try again now, and the `timeout=None` should no longer be necessary. Let me know if you're still running in to any issues. Thanks!

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

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, Facebook or Instagram.

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!