<div dir="ltr"><div><div><div><div><div>Hello all,<br><br></div>we experience errors related to tile locks, hopefully someone can help us understand it better.<br><br></div>On the client side WMTS requests result in a 500 error every once in a while, and the tiles are missing from the map. This may repeat several times with the same tile, but after 2-4 requests the problem tile finally appears along all others.<br><br></div>On the server side I see following error stack in Apache log:<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Traceback (most recent call last):<br>  File "/usr/local/lib/python2.7/dist-packages/mapproxy/wsgiapp.py", line 181, in __call__<br>    resp = self.handlers[handler_name].handle(req)<br>  File "/usr/local/lib/python2.7/dist-packages/mapproxy/service/base.py", line 30, in handle<br>    return handler(parsed_req)<br>  File "/usr/local/lib/python2.7/dist-packages/mapproxy/service/wmts.py", line 90, in tile<br>    tile = tile_layer.render(request, coverage=limited_to, decorate_img=decorate_img)<br>  File "/usr/local/lib/python2.7/dist-packages/mapproxy/service/tile.py", line 307, in render<br>    dimensions=dimensions, with_metadata=True)<br>  File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py", line 106, in load_tile_coord<br>    created_tiles = creator.create_tiles([tile])<br>  File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py", line 215, in create_tiles<br>    created_tiles = self._create_single_tiles(tiles)<br>  File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py", line 239, in _create_single_tiles<br>    created_tiles.extend(self._create_single_tile(tile))<br>  File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py", line 253, in _create_single_tile<br>    with self.tile_mgr.lock(tile):<br>  File "/usr/local/lib/python2.7/dist-packages/mapproxy/platform/cpython/lock.py", line 42, in __enter__<br>    self.lock()<br>  File "/usr/local/lib/python2.7/dist-packages/mapproxy/platform/cpython/lock.py", line 65, in lock<br>    self._lock = self._try_lock()<br>  File "/usr/local/lib/python2.7/dist-packages/mapproxy/platform/cpython/lock.py", line 56, in _try_lock<br>    return LockFile(self.lock_file)<br>  File "/usr/local/lib/python2.7/dist-packages/mapproxy/util/ext/lockfile.py", line 118, in __init__<br>    fp = open(path, 'w+')<br>IOError: [Errno 2] No such file or directory: '/var/www/mapproxy/./cache_data/tile_locks/eda388bb1416de8b4085a3c094810f07-2838-6564-14.lck'<br></blockquote><br><br></div>Our configuration uses cache based on multiple sources, so no actual cache tiles are stored. Could that be related? Here is a sample config:<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">caches<br>  MixedSource_cache:<br>    grids: [webmercator]<br>    sources: [MixedSource_p_tms, MixedSource_j_tms]<br>    format: mixed<br>    request_format: image/png<br><br>parts:<br>  on_error: &onerror<br>    other:<br>      response: transparent<br>      cache: false<br><br>sources:<br>  MixedSource_p_tms:<br>    type: tile<br>    url: file:///path/to/tiles/%(z)s/%(x)s/%(y)s.png<br>    coverage:<br>      bbox: [-118.12,33.38,-117.4,33.95]<br>      bbox_srs: 'EPSG:4326'<br>    transparent: true<br>    on_error: *onerror<br>  MixedSource_j_tms:<br>    type: tile<br>    url: file:///path/to/tiles/%(z)s/%(x)s/%(y)s.jpg<br>    coverage:<br>      bbox: [-118.12,33.38,-117.4,33.95]<br>      bbox_srs: 'EPSG:4326'<br>    transparent: true<br>    on_error: *onerror<br></blockquote></div><div><br></div><div>We use Mapproxy 1.7.1 and all the data is mounted via the NFS mounts. <br><br></div><div>Any ideas would be very much appreciated! I am not sure what causes this error.. It seems odd that it happens only with some tiles, persists for a few times, and then this same tile can be served properly..<br></div><div><br>Thank you!<br></div><div><div><div><div><div><div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><b><span style="font-size:12pt;line-height:115%;font-family:Arial,sans-serif;color:rgb(0,40,168)">Anna Pestereva, GISP</span><span style="font-size:12pt;line-height:115%;font-family:Arial,sans-serif"> | <i><span>Application Developer & Cartographer</span></i></span></b><span style="line-height:115%;font-size:12pt;font-family:Arial,sans-serif"><br>


</span><b><span style="font-size:12pt;line-height:115%;font-family:Arial,sans-serif;color:gray">Aerial Services, Inc.
(ASI) </span></b><span style="font-size:12pt;line-height:115%;font-family:Arial,sans-serif;color:gray"><br>
</span><span style="font-size:11pt;line-height:115%;font-family:Calibri,sans-serif"><a href="http://aerialservicesinc.com/photoblogmetry/" target="_blank"><span style="font-size:10pt;line-height:115%;font-family:Arial,sans-serif"></span></a></span><span></span></div></div></div></div>
</div></div></div></div></div></div></div>