<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Tim,</p>
    <p>as far as I can see this error message comes from the specific
      ReadMultiRange() method that has no retry capabilities. It should
      probably, although I'm unsure from an implementation point of view
      how that would work with the multi request curl API. I guess it
      can. Anway, just to tell that you're going to be out of luck
      there.</p>
    <p>A  workaround would be to set GDAL_HTTP_MULTIRANGE=SERIAL to go
      back to the classic code path (obviously you'll loose the parallel
      network request aspect!), and there GDAL_HTTP_RETRY_CODES=ALL
      should hopefully work even for response_code=0</p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 19/12/2024 à 20:13, Tim Harris via
      gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAK3fJgXFAn-LBky8oJ3E=E9HmEEc-UArNioJ9rEWhse1eNKvzQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <p class="MsoNormal"
style="margin:0in;font-size:11pt;font-family:Aptos,sans-serif;color:rgb(0,0,0);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">I
          am using Python and translating small chunks of imagery out of
          S3 and occasionally run into errors like this:<span></span></p>
        <p class="MsoNormal"
style="margin:0in;font-size:11pt;font-family:Aptos,sans-serif;color:rgb(0,0,0);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span> </span></p>
        <p class="MsoNormal"
style="margin:0in;font-size:11pt;font-family:Aptos,sans-serif;color:rgb(0,0,0);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">2024-12-17
          18:06:16.201 MST: ERROR 1: Request for 372390946-372700449
          failed with response_code=0<span></span></p>
        <p class="MsoNormal"
style="margin:0in;font-size:11pt;font-family:Aptos,sans-serif;color:rgb(0,0,0);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">2024-12-17
          18:06:16.201 MST: ERROR 1: Request for 2028508162-2028817665
          failed with response_code=0<span></span></p>
        <p class="MsoNormal"
style="margin:0in;font-size:11pt;font-family:Aptos,sans-serif;color:rgb(0,0,0);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">2024-12-17
          18:06:16.201 MST: ERROR 1: Request for 2030984194-2031293697
          failed with response_code=0<span></span></p>
        <p class="MsoNormal"
style="margin:0in;font-size:11pt;font-family:Aptos,sans-serif;color:rgb(0,0,0);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">2024-12-17
          18:06:16.202 MST: ERROR 1: Request for 1476778594-1477088097
          failed with response_code=0<span></span></p>
        <p class="MsoNormal"
style="margin:0in;font-size:11pt;font-family:Aptos,sans-serif;color:rgb(0,0,0);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">2024-12-17
          18:06:16.202 MST: ERROR 1: Request for 374247970-374557473
          failed with response_code=0<span></span></p>
        <p class="MsoNormal"
style="margin:0in;font-size:11pt;font-family:Aptos,sans-serif;color:rgb(0,0,0);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span> </span></p>
        <p class="MsoNormal"
style="margin:0in;font-size:11pt;font-family:Aptos,sans-serif;color:rgb(0,0,0);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">Even
          with gdal.UseExceptions() and GDAL_HTTP_MAX_RETRY /
          GDAL_HTTP_RETRY_DELAY set, it doesn’t seem to do anything
          other than log this error and proceed. The end result is that
          my output file has blank pixels in it.<span></span></p>
        <p class="MsoNormal"
style="margin:0in;font-size:11pt;font-family:Aptos,sans-serif;color:rgb(0,0,0);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span> </span></p>
        <p class="MsoNormal"
style="margin:0in;font-size:11pt;font-family:Aptos,sans-serif;color:rgb(0,0,0);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">I
          have been staring at the code a bit to understand what it
          means, particularly the response_code being 0. I see this in
          the libcurl docs:<span></span></p>
        <p class="MsoNormal"
style="margin:0in;font-size:11pt;font-family:Aptos,sans-serif;color:rgb(0,0,0);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span> </span></p>
        <p class="MsoNormal"
style="margin:0in;font-size:11pt;font-family:Aptos,sans-serif;color:rgb(0,0,0);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">>
          The stored value is zero if no server response code has been
          received.<span></span></p>
        <p class="MsoNormal"
style="margin:0in;font-size:11pt;font-family:Aptos,sans-serif;color:rgb(0,0,0);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span> </span></p>
        <p class="MsoNormal"
style="margin:0in;font-size:11pt;font-family:Aptos,sans-serif;color:rgb(0,0,0);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">I
          still don’t quite know why this happens but could be that some
          AWS server closed a connection early or something. But is
          there any way to force a retry? I see that
          GDAL_HTTP_RETRY_CODES was added recently. If I set it to “ALL”
          will that ensure that a situation like this results in a retry
          even on a closed connection? I am not set up to easily
          reproduce this or even to see a stack trace, so I’m not sure
          what leads to this error. It doesn’t happen very often, but
          it’s disruptive when it does happen because it’s hard to
          catch.</p>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.
Butcher of all kinds of standards, open or closed formats. At the end, this is just about bytes.
Mood of the day: "Bien entendu, on peut sauter sur sa chaise comme un cabri en disant : les standards ! les standards ! les standards ! Mais ça n’aboutit à rien et ça ne signifie rien." ~ dixit De Gaulle</pre>
  </body>
</html>