<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><font face="Tahoma">Dear all!</font></p>
    <p><font face="Tahoma">We are running a Python application an a
        linux distribution (RedHat) which creates clips in MBTILES
        format from a WMS. We are using the Python-API and are basically
        doing something like this:</font></p>
    <p><font face="Courier New, Courier, monospace">src_ds = gdal.Warp(<br>
            tmp_file,<br>
            ds_in,<br>
            format='GTiff',<br>
            outputBounds=[bbox[0], bbox[2], bbox[1], bbox[3]],<br>
            dstSRS=output_srs,<br>
        )<br>
        ds_out = gdal.Translate(<br>
            out_filepath,<br>
            src_ds,<br>
            format='MBTILES',<br>
            creationOptions=creation_options,<br>
        )</font></p>
    <p><font face="Tahoma">The application throughs an error from time
        to time since a few days. We couldn't figure out a pattern yet
        and therefore we are also not able to reproduce the error. The
        error is the following:</font></p>
    <p><font face="Tahoma"><font face="Courier New, Courier, monospace">Mon
          Nov 15 13:48:13 2021: CPLError: GDALWMS: Unable to download
          block 2765, 602.<br>
          URL: TCP connection reset by peer<br>
            HTTP status code: 0, error: TCP connection reset by peer.<br>
          Add the HTTP status code to <ZeroBlockHttpCodes> to
          ignore this error (see <a class="moz-txt-link-freetext" href="http://www.gdal.org/frmt_wms.html">http://www.gdal.org/frmt_wms.html</a>).<br>
          Mon Nov 15 13:48:13 2021: CPLError: /wms_xml/wms_config.xml,
          band 1: IReadBlock failed at X offset 2764, Y offset 601<br>
          Mon Nov 15 13:48:13 2021: CPLError: GetBlockRef failed at X
          block offset 2764, Y block offset 601</font><br>
      </font></p>
    <p><font face="Tahoma">The exact same data gets </font><font
        face="Tahoma"><font face="Tahoma">processed successfully in one
          run and not successfully in another run.</font> We didn't
        change the code nor the Python or GDAL version. Hence, we are
        kind of puzzled as the error comes and goes seemingly at random.</font>
      <br>
    </p>
    <p><font face="Tahoma"><font face="Tahoma">Does anyone of you have
          any hints?<br>
        </font></font></p>
    <p><font face="Tahoma"><font face="Tahoma">Thanks & best
          regards!<br>
          Roman<br>
        </font></font></p>
    <p>
    </p>
    <pre class="moz-signature" cols="72">_______________________________________________
Dipl.-Ing. Roman Breitfuss-Schiffer, MSc. (GIS)
</pre>
  </body>
</html>