<?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: How long should I wait for /upload_session/finish_batch/check to complete? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-long-should-I-wait-for-upload-session-finish-batch-check-to/m-p/516710#M25303</link>
    <description>&lt;P&gt;There isn't a guaranteed maximum time that one of these batch jobs may take. The processing time will depend on a few factors, such as how many files there are, etc., so it can vary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Likewise, there isn't a best frequency for how often to poll these jobs. Once a second is fine. For larger batches, which may take longer given the larger amount of work to do, you could increase that a bit if you wish.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The 500 Internal Server Error indicates an issue on the Dropbox servers, so we'll have to look into that. For reference though, can you let me know if that's transient or if you can reliably reproduce that error, e.g., if you try again now? Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Wed, 28 Apr 2021 16:10:19 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2021-04-28T16:10:19Z</dc:date>
    <item>
      <title>How long should I wait for /upload_session/finish_batch/check to complete?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-long-should-I-wait-for-upload-session-finish-batch-check-to/m-p/516593#M25299</link>
      <description>&lt;P&gt;In order to complete a batch it is necessary to call&lt;SPAN&gt;&amp;nbsp; &lt;A title="upload_session/finish_batch/check" href="https://www.dropbox.com/developers/documentation/http/documentation#files-upload_session-finish_batch-check" target="_blank" rel="noopener"&gt;upload_session/finish_batch/check&lt;/A&gt;&amp;nbsp;. The docs for this don't give any guidance on&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;How long to try calling this API for&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;How often to call it&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;In the batch upload I'm developing for rclone I've arbitrarily chosen 2 minutes and 1 second so rclone checks for completion for a maximum of 120 times at 1 second intervals.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This seems to work very well, but occasionally I seem to need more than 120 seconds to complete a batch. I think this might be a bug at as the next batch complete returns a 500 error.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here is the last transaction (which looks normal) before rclone gives up&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;2021/04/19 20:10:19 DEBUG : HTTP REQUEST (req 0xc001103900)
2021/04/19 20:10:19 DEBUG : POST /2/files/upload_session/finish_batch/check HTTP/1.1
Host: api.dropboxapi.com
User-Agent: rclone/v1.56.0-beta.5394.d16702566.fix-dropbox-batch-sync
Content-Length: 113
Authorization: XXXX
Content-Type: application/json
Accept-Encoding: gzip

2021/04/19 20:10:19 DEBUG : &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
2021/04/19 20:10:19 DEBUG : &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;
2021/04/19 20:10:19 DEBUG : HTTP RESPONSE (req 0xc001103900)
2021/04/19 20:10:19 DEBUG : HTTP/2.0 200 OK
Content-Length: 23
Accept-Encoding: identity,gzip
Cache-Control: no-cache
Content-Type: application/json
Date: Tue, 20 Apr 2021 00:10:19 GMT
Server: envoy
X-Content-Type-Options: nosniff
X-Dropbox-Request-Id: f746ed86c87a4fdcaf660a12d19f1a24
X-Dropbox-Response-Origin: far_remote
X-Frame-Options: SAMEORIGIN
X-Server-Response-Time: 109

{".tag": "in_progress"}&lt;/PRE&gt;
&lt;PRE&gt;2021/04/19 20:10:20 ERROR : Dropbox root 'jbod2': sync batch commit: failed to commit batch length 1: wait for batch failed after 120 tries: batch didn't complete&lt;/PRE&gt;
&lt;P&gt;So rclone gives up here and tries to finish the next batch&lt;/P&gt;
&lt;PRE&gt;2021/04/19 20:10:21 DEBUG : HTTP REQUEST (req 0xc001373b00)
2021/04/19 20:10:21 DEBUG : POST /2/files/upload_session/finish_batch HTTP/1.1
Host: api.dropboxapi.com
User-Agent: rclone/v1.56.0-beta.5394.d16702566.fix-dropbox-batch-sync
Content-Length: 907
Authorization: XXXX
Content-Type: application/json
Accept-Encoding: gzip

2021/04/19 20:10:21 DEBUG : &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
2021/04/19 20:10:21 DEBUG : &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;
2021/04/19 20:10:21 DEBUG : HTTP RESPONSE (req 0xc001373b00)
2021/04/19 20:10:21 DEBUG : HTTP/2.0 500 Internal Server Error
Content-Length: 0
Accept-Encoding: identity,gzip
Content-Security-Policy: sandbox allow-forms allow-scripts
Content-Type: text/plain; charset=utf-8
Date: Tue, 20 Apr 2021 00:10:21 GMT
Server: envoy
X-Dropbox-Request-Id: c787b53ec12e42eba8e0d650a28086ff
X-Dropbox-Response-Origin: far_remote

&lt;/PRE&gt;
&lt;P&gt;And immediately gets a 500 error. Rclone retries this 10 times then gives up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some guidance here would be appreciated&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;What is the longest time to commit a batch?&lt;/LI&gt;
&lt;LI&gt;What is the best polling frequency for batch completion?&lt;/LI&gt;
&lt;LI&gt;Is the above normal or a bug?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;This problem was reported in &lt;A title="Issue #5008" href="https://github.com/rclone/rclone/issues/5008#issuecomment-828313035" target="_self"&gt;the rclone issue tracker #5008&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Nick&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 10:12:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-long-should-I-wait-for-upload-session-finish-batch-check-to/m-p/516593#M25299</guid>
      <dc:creator>ncw</dc:creator>
      <dc:date>2021-04-28T10:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: How long should I wait for /upload_session/finish_batch/check to complete?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-long-should-I-wait-for-upload-session-finish-batch-check-to/m-p/516710#M25303</link>
      <description>&lt;P&gt;There isn't a guaranteed maximum time that one of these batch jobs may take. The processing time will depend on a few factors, such as how many files there are, etc., so it can vary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Likewise, there isn't a best frequency for how often to poll these jobs. Once a second is fine. For larger batches, which may take longer given the larger amount of work to do, you could increase that a bit if you wish.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The 500 Internal Server Error indicates an issue on the Dropbox servers, so we'll have to look into that. For reference though, can you let me know if that's transient or if you can reliably reproduce that error, e.g., if you try again now? Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 16:10:19 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-long-should-I-wait-for-upload-session-finish-batch-check-to/m-p/516710#M25303</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-04-28T16:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: How long should I wait for /upload_session/finish_batch/check to complete?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-long-should-I-wait-for-upload-session-finish-batch-check-to/m-p/516736#M25307</link>
      <description>&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;There isn't a guaranteed maximum time that one of these batch jobs may take. The processing time will depend on a few factors, such as how many files there are, etc., so it can vary.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There was only one file in the batch above so for it to take 2 minutes seems a long time. But then I have no idea what is going on behind the scenes!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;nbsp;Likewise, there isn't a best frequency for how often to poll these jobs. Once a second is fine. For larger batches, which may take longer given the larger amount of work to do, you could increase that a bit if you wish.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OK.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;nbsp;The 500 Internal Server Error indicates an issue on the Dropbox servers, so we'll have to look into that. For reference though, can you let me know if that's transient or if you can reliably reproduce that error, e.g., if you try again now?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I got that trace second hand from an rclone tester, but I believe&amp;nbsp;it only happens quite rarely when doing a lot of transfers over a long time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 17:27:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-long-should-I-wait-for-upload-session-finish-batch-check-to/m-p/516736#M25307</guid>
      <dc:creator>ncw</dc:creator>
      <dc:date>2021-04-28T17:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: How long should I wait for /upload_session/finish_batch/check to complete?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-long-should-I-wait-for-upload-session-finish-batch-check-to/m-p/516747#M25308</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/45015"&gt;@ncw&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;...&lt;BR /&gt;So rclone gives up here and tries to finish the next batch&lt;BR /&gt;...&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/45015"&gt;@ncw&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Key moment here may be that only one active batch could work at a moment for the same user. According your description the last running batch might not successfully finished yet (or unsuccessfully), while you are trying a new one! This might confuse Dropbox server and provokes some rare bug as a response. 🤷 As a workaround (temporary or not) you can stop any follow up ongoing automatic processing, signal ongoing error, and wait for new user command.&lt;/P&gt;&lt;P&gt;Let's hope this will be traced successfully and fixed soon.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 18:14:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-long-should-I-wait-for-upload-session-finish-batch-check-to/m-p/516747#M25308</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2021-04-28T18:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: How long should I wait for /upload_session/finish_batch/check to complete?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-long-should-I-wait-for-upload-session-finish-batch-check-to/m-p/516751#M25309</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/45015"&gt;@ncw&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I got that trace second hand from an rclone tester, but I believe&amp;nbsp;it only happens quite rarely when doing a lot of transfers over a long time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/45015"&gt;@ncw&lt;/a&gt; Thanks! That seems to match what I can see on our side. It appears this was a transient availability issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/45015"&gt;@ncw&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;Rclone retries this 10 times then gives up.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;How quickly does Rclone perform these retries on a 500 like this? If it's in relatively quick succession, you may want to implement an exponential backoff to give the service more time to recover when this does occur.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 18:30:13 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-long-should-I-wait-for-upload-session-finish-batch-check-to/m-p/516751#M25309</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-04-28T18:30:13Z</dc:date>
    </item>
  </channel>
</rss>

