We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
otky
5 years agoExplorer | Level 4
The underlying connection was closed error.
Hi,
I'm using DropBox API v2 to get folders and files from user account. For that I'm using "files/list_folder", "files/list_folder/continue" endpoints and also I'm using recursive: true for ro...
Greg-DB
Dropbox Community Moderator
5 years agoI'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:
- the name and version number of the SDK/library you are using, if any
- the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
- the full text of any error or unexpected output
- otky5 years agoExplorer | Level 4
Thanks for the quick response . I'm not using any sdk just I'm using c# HttpWebRequest with API endpoints.
Find the below endpoints and breif description of the code .
endpoint : https://api.dropbox.com/2/files/list_folder
and adding {"path":"","recursive":true} to request stream
headers: Dropbox-API-Select-User:{{userId}}
if response contains "has_more" then using the below endpoint
endpoint : https://api.dropbox.com/2/files/list_folder/continue
{cursor:cursorid} to request stream
headers: Dropbox-API-Select-User:{{userId}}
to download files I'm using
endpoint: https://api-content.dropbox.com/2/files/download
{"path":"rev:{revisionId}"}Regarding the error messages after running for sometime(more than 1 day) I got "Unable to connect to the remote server , A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond" sometimes and "The underlying connection was closed: A connection that was expected to be kept alive was closed by the server." sometimes.
Thanks,
OTKY
- Greg-DB5 years ago
Dropbox Community Moderator
Thanks for following up. It's not clear from this why this would be happening, but a few possibilities/other questions:
- Is there anything on your network connection, such as a firewall, proxy, VPN, anti-virus, or other security software that may be interfering with your connection to api-content.dropbox.com?
- When you say it's "running for sometime(more than 1 day)", do you mean the overall process, or an individual request? How long is an individual /2/files/download request taking before failing?
- About what percent of your /2/files/download requests are failing?
- When you say you have "when multiple colletions running at same time", do you mean you have more than one request to /2/files/download running simultaneously? If so, how many?
- otky5 years agoExplorer | Level 4
Hi,
Please find my answers in Italic.
- Is there anything on your network connection, such as a firewall, proxy, VPN, anti-virus, or other security software that may be interfering with your connection to api-content.dropbox.com?
I'm not sure about these. But do these things cause the issue for accounts which have larger number of files?
- When you say it's "running for sometime(more than 1 day)", do you mean the overall process, or an individual request? How long is an individual /2/files/download request taking before failing?
Yes the overall process for downloading the files one by one from DropBox account.
- About what percent of your /2/files/download requests are failing?
Sometimes its failing at "/2/files/download" and sometimes its failing at "files/list_folder/continue" . But in both the cases its not failing immediately.
- When you say you have "when multiple colletions running at same time", do you mean you have more than one request to /2/files/download running simultaneously? If so, how many?
Yes , 2-3 processes running simultaneously .Is there any chances of throttling here ? If there is a throttling issue , will all the processes running at that time will throw errors and stop execution from then?
Thanks,
OTKY.
About Discuss Dropbox Developer & API
Make connections with 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!