<?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: Getting lots of connection timeout issues using Python API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-lots-of-connection-timeout-issues-using-Python-API/m-p/145198#M4687</link>
    <description>&lt;P&gt;Hi Grant, thanks for the report. I can't seem to reproduce this here though. About what percent of your API calls are failing?&lt;/P&gt;
&lt;P&gt;For reference, I just tried this simplified code, using v2.2.0 of the SDK:&lt;/P&gt;
&lt;PRE&gt;import dropbox&lt;BR /&gt;&lt;BR /&gt;ACCESS_TOKEN = '...'&lt;BR /&gt;&lt;BR /&gt;client = dropbox.client.DropboxClient(ACCESS_TOKEN)&lt;BR /&gt;&lt;BR /&gt;for i in range(100):&lt;BR /&gt;    print(i)&lt;BR /&gt;    # /test.pdf is a 4MB PDF file&lt;BR /&gt;    print len(client.get_file("/test.pdf").read())&lt;/PRE&gt;
&lt;P&gt;I didn't get any timeout failures from that. Can you try it too and let me know what you get?&amp;nbsp;Thanks in advance!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, there are of course many different factors that can impact network performance and reliability. Can you&amp;nbsp;check on any security software, e.g., anti-virus, firewalls, or proxies that may be impacting your connection?&amp;nbsp;Likewise, are you making many other calls at the same time, or otherwise congesting your network connection? Similarly, your ISP may be having trouble or throttling your connection.&lt;/P&gt;</description>
    <pubDate>Sat, 20 Feb 2016 04:40:24 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2016-02-20T04:40:24Z</dc:date>
    <item>
      <title>Getting lots of connection timeout issues using Python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-lots-of-connection-timeout-issues-using-Python-API/m-p/145197#M4686</link>
      <description>&lt;P&gt;The last&amp;nbsp;few weeks I've been getting connection timeout issues more and more often. I am using the&amp;nbsp;&lt;A href="https://pypi.python.org/pypi/dropbox/2.2.0" target="_blank" rel="nofollow noreferrer"&gt;Dropbox Python API version 2.2.0&lt;/A&gt;&amp;nbsp;with Python 2.7.11.&lt;/P&gt;
&lt;P&gt;For instance, I received this error when downloading a file that is only 473 KB large:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;ConnectTimeoutError at /my_company/file/download.pdf (&amp;lt;urllib3.connectionpool.VerifiedHTTPSConnection instance at 0x7f4eaa950950&amp;gt;, ‘Connection to api-content.dropbox.com timed out. (connect timeout=60.0)’)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;Here's the code that is being run inside of the view:&lt;/P&gt;
&lt;P class="p1"&gt;response = HttpResponse(content_type='application/pdf')&lt;BR /&gt;response['Content-Disposition'] = 'attachment; filename="preview.pdf"'&lt;BR /&gt;client = dropbox.client.DropboxClient('my_token')&lt;BR /&gt;with client.get_file(path) as f:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; response.write(f.read())&lt;BR /&gt;return response&lt;/P&gt;
&lt;P class="p1"&gt;Pretty basic stuff. Just downloading the file and rendering it to the response. Yet this resulted in a connection timeout error. Any ideas why?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:35:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-lots-of-connection-timeout-issues-using-Python-API/m-p/145197#M4686</guid>
      <dc:creator>Grant M.6</dc:creator>
      <dc:date>2019-05-29T09:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Getting lots of connection timeout issues using Python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-lots-of-connection-timeout-issues-using-Python-API/m-p/145198#M4687</link>
      <description>&lt;P&gt;Hi Grant, thanks for the report. I can't seem to reproduce this here though. About what percent of your API calls are failing?&lt;/P&gt;
&lt;P&gt;For reference, I just tried this simplified code, using v2.2.0 of the SDK:&lt;/P&gt;
&lt;PRE&gt;import dropbox&lt;BR /&gt;&lt;BR /&gt;ACCESS_TOKEN = '...'&lt;BR /&gt;&lt;BR /&gt;client = dropbox.client.DropboxClient(ACCESS_TOKEN)&lt;BR /&gt;&lt;BR /&gt;for i in range(100):&lt;BR /&gt;    print(i)&lt;BR /&gt;    # /test.pdf is a 4MB PDF file&lt;BR /&gt;    print len(client.get_file("/test.pdf").read())&lt;/PRE&gt;
&lt;P&gt;I didn't get any timeout failures from that. Can you try it too and let me know what you get?&amp;nbsp;Thanks in advance!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, there are of course many different factors that can impact network performance and reliability. Can you&amp;nbsp;check on any security software, e.g., anti-virus, firewalls, or proxies that may be impacting your connection?&amp;nbsp;Likewise, are you making many other calls at the same time, or otherwise congesting your network connection? Similarly, your ISP may be having trouble or throttling your connection.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Feb 2016 04:40:24 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-lots-of-connection-timeout-issues-using-Python-API/m-p/145198#M4687</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-02-20T04:40:24Z</dc:date>
    </item>
  </channel>
</rss>

