[MapProxy] Error: No such file or directory: .lck

Pestereva, Anna apestereva at aerialservicesinc.com
Thu Jul 21 10:09:27 PDT 2016


Hello all,

we experience errors related to tile locks, hopefully someone can help us
understand it better.

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.

On the server side I see following error stack in Apache log:

Traceback (most recent call last):
>   File "/usr/local/lib/python2.7/dist-packages/mapproxy/wsgiapp.py", line
> 181, in __call__
>     resp = self.handlers[handler_name].handle(req)
>   File "/usr/local/lib/python2.7/dist-packages/mapproxy/service/base.py",
> line 30, in handle
>     return handler(parsed_req)
>   File "/usr/local/lib/python2.7/dist-packages/mapproxy/service/wmts.py",
> line 90, in tile
>     tile = tile_layer.render(request, coverage=limited_to,
> decorate_img=decorate_img)
>   File "/usr/local/lib/python2.7/dist-packages/mapproxy/service/tile.py",
> line 307, in render
>     dimensions=dimensions, with_metadata=True)
>   File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py",
> line 106, in load_tile_coord
>     created_tiles = creator.create_tiles([tile])
>   File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py",
> line 215, in create_tiles
>     created_tiles = self._create_single_tiles(tiles)
>   File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py",
> line 239, in _create_single_tiles
>     created_tiles.extend(self._create_single_tile(tile))
>   File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py",
> line 253, in _create_single_tile
>     with self.tile_mgr.lock(tile):
>   File
> "/usr/local/lib/python2.7/dist-packages/mapproxy/platform/cpython/lock.py",
> line 42, in __enter__
>     self.lock()
>   File
> "/usr/local/lib/python2.7/dist-packages/mapproxy/platform/cpython/lock.py",
> line 65, in lock
>     self._lock = self._try_lock()
>   File
> "/usr/local/lib/python2.7/dist-packages/mapproxy/platform/cpython/lock.py",
> line 56, in _try_lock
>     return LockFile(self.lock_file)
>   File
> "/usr/local/lib/python2.7/dist-packages/mapproxy/util/ext/lockfile.py",
> line 118, in __init__
>     fp = open(path, 'w+')
> IOError: [Errno 2] No such file or directory:
> '/var/www/mapproxy/./cache_data/tile_locks/eda388bb1416de8b4085a3c094810f07-2838-6564-14.lck'
>


Our configuration uses cache based on multiple sources, so no actual cache
tiles are stored. Could that be related? Here is a sample config:

caches
>   MixedSource_cache:
>     grids: [webmercator]
>     sources: [MixedSource_p_tms, MixedSource_j_tms]
>     format: mixed
>     request_format: image/png
>
> parts:
>   on_error: &onerror
>     other:
>       response: transparent
>       cache: false
>
> sources:
>   MixedSource_p_tms:
>     type: tile
>     url: file:///path/to/tiles/%(z)s/%(x)s/%(y)s.png
>     coverage:
>       bbox: [-118.12,33.38,-117.4,33.95]
>       bbox_srs: 'EPSG:4326'
>     transparent: true
>     on_error: *onerror
>   MixedSource_j_tms:
>     type: tile
>     url: file:///path/to/tiles/%(z)s/%(x)s/%(y)s.jpg
>     coverage:
>       bbox: [-118.12,33.38,-117.4,33.95]
>       bbox_srs: 'EPSG:4326'
>     transparent: true
>     on_error: *onerror
>

We use Mapproxy 1.7.1 and all the data is mounted via the NFS mounts.

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..

Thank you!
-- 
*Anna Pestereva, GISP | Application Developer & Cartographer*
*Aerial Services, Inc. (ASI) *
<http://aerialservicesinc.com/photoblogmetry/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20160721/e9a89827/attachment.html>


More information about the MapProxy mailing list