<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: The underlying connection was closed error. in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/The-underlying-connection-was-closed-error/m-p/561090#M2255</link>
    <description>&lt;P&gt;Thanks for the quick response . I'm not using any sdk just I'm using c# HttpWebRequest with API endpoints.&lt;/P&gt;&lt;P&gt;Find the below endpoints and breif description of the code .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;endpoint : &lt;A href="https://api.dropbox.com/2/files/list_folder" target="_blank" rel="noopener"&gt;https://api.dropbox.com/2/files/list_folder&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and adding {"path":"","recursive":true} to request stream&lt;/P&gt;&lt;P&gt;headers: Dropbox-API-Select-User:{{userId}}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if response contains "has_more" then using the below endpoint&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;endpoint : &lt;A href="https://api.dropbox.com/2/files/list_folder/continue" target="_blank" rel="noopener"&gt;https://api.dropbox.com/2/files/list_folder/continue&lt;/A&gt;&lt;BR /&gt;{cursor:cursorid} to request stream&lt;BR /&gt;headers: Dropbox-API-Select-User:{{userId}}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;to download files I'm using&lt;BR /&gt;endpoint: &lt;A href="https://api-content.dropbox.com/2/files/download" target="_blank" rel="noopener"&gt;https://api-content.dropbox.com/2/files/download&lt;/A&gt;&lt;BR /&gt;{"path":"rev:{revisionId}"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding the error messages after running for sometime(more than 1 day) I got "&lt;SPAN&gt;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&lt;/SPAN&gt;" sometimes and "The underlying connection was closed: A connection that was expected to be kept alive was closed by the server." sometimes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;OTKY&lt;/P&gt;</description>
    <pubDate>Mon, 29 Nov 2021 09:38:27 GMT</pubDate>
    <dc:creator>otky</dc:creator>
    <dc:date>2021-11-29T09:38:27Z</dc:date>
    <item>
      <title>The underlying connection was closed error.</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/The-underlying-connection-was-closed-error/m-p/560620#M2252</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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 root folder and cursor: cursorvalue while iterate. The problem here is the user account contains almost 400k+ files and while downloading them I'm getting "&lt;STRONG&gt;The underlying connection was closed: A connection that was expected to be kept alive was closed by the server&lt;/STRONG&gt;." error after some time. Is this error related to any API limitations? Is there any chance to get this error when multiple colletions running at same time?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;OTKY&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 17:05:39 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/The-underlying-connection-was-closed-error/m-p/560620#M2252</guid>
      <dc:creator>otky</dc:creator>
      <dc:date>2021-11-30T17:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: The underlying connection was closed error.</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/The-underlying-connection-was-closed-error/m-p/560785#M2254</link>
      <description>&lt;P&gt;I'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:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;the name and version number of the SDK/library you are using, if any&lt;/LI&gt;
&lt;LI&gt;the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)&lt;/LI&gt;
&lt;LI&gt;the full text of any error or unexpected output&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 26 Nov 2021 22:05:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/The-underlying-connection-was-closed-error/m-p/560785#M2254</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-11-26T22:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: The underlying connection was closed error.</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/The-underlying-connection-was-closed-error/m-p/561090#M2255</link>
      <description>&lt;P&gt;Thanks for the quick response . I'm not using any sdk just I'm using c# HttpWebRequest with API endpoints.&lt;/P&gt;&lt;P&gt;Find the below endpoints and breif description of the code .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;endpoint : &lt;A href="https://api.dropbox.com/2/files/list_folder" target="_blank" rel="noopener"&gt;https://api.dropbox.com/2/files/list_folder&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and adding {"path":"","recursive":true} to request stream&lt;/P&gt;&lt;P&gt;headers: Dropbox-API-Select-User:{{userId}}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if response contains "has_more" then using the below endpoint&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;endpoint : &lt;A href="https://api.dropbox.com/2/files/list_folder/continue" target="_blank" rel="noopener"&gt;https://api.dropbox.com/2/files/list_folder/continue&lt;/A&gt;&lt;BR /&gt;{cursor:cursorid} to request stream&lt;BR /&gt;headers: Dropbox-API-Select-User:{{userId}}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;to download files I'm using&lt;BR /&gt;endpoint: &lt;A href="https://api-content.dropbox.com/2/files/download" target="_blank" rel="noopener"&gt;https://api-content.dropbox.com/2/files/download&lt;/A&gt;&lt;BR /&gt;{"path":"rev:{revisionId}"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding the error messages after running for sometime(more than 1 day) I got "&lt;SPAN&gt;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&lt;/SPAN&gt;" sometimes and "The underlying connection was closed: A connection that was expected to be kept alive was closed by the server." sometimes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;OTKY&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 09:38:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/The-underlying-connection-was-closed-error/m-p/561090#M2255</guid>
      <dc:creator>otky</dc:creator>
      <dc:date>2021-11-29T09:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: The underlying connection was closed error.</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/The-underlying-connection-was-closed-error/m-p/561152#M2256</link>
      <description>&lt;P&gt;Thanks for following up. It's not clear from this why this would be happening, but a few possibilities/other questions:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;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?&lt;/LI&gt;
&lt;LI&gt;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?&lt;/LI&gt;
&lt;LI&gt;About what percent of your /2/files/download requests are failing?&lt;/LI&gt;
&lt;LI&gt;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?&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 29 Nov 2021 16:05:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/The-underlying-connection-was-closed-error/m-p/561152#M2256</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-11-29T16:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: The underlying connection was closed error.</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/The-underlying-connection-was-closed-error/m-p/562817#M2270</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please find my answers in Italic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;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?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;I'm not sure about these. But do these things cause the issue for accounts which have larger number of files?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;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?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;Yes the overall process for downloading the files one by one from DropBox account.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;About what percent of your /2/files/download requests are failing?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;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.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;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?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;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&amp;nbsp; and stop execution from then?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Thanks,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;OTKY.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 04:06:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/The-underlying-connection-was-closed-error/m-p/562817#M2270</guid>
      <dc:creator>otky</dc:creator>
      <dc:date>2021-12-07T04:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: The underlying connection was closed error.</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/The-underlying-connection-was-closed-error/m-p/562909#M2271</link>
      <description>&lt;P&gt;Things potentially interfering with your network connection wouldn't depend on how many files are in the connected account. I recommend checking for any such potential issues regardless of the file count.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For reference, the Dropbox API does have a rate limiting system, but if it rejects any particular call, it would respond with an explicit error response, with a 429 status code. It would not just close the connection as you're seeing here, so that does not seem to be the issue. In any case, 2-3 simultaneous requests is not excessive and so we would not expect such activity to be rate limited.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, since this is actually happening on both /2/files/download and /2/files/list_folder/continue (which use different hosts), it sounds like there's likely client-side issue here. We can't offer help with HttpWebRequest itself though, as that's not made by Dropbox.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 15:58:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/The-underlying-connection-was-closed-error/m-p/562909#M2271</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-12-07T15:58:15Z</dc:date>
    </item>
  </channel>
</rss>

