[MapProxy] Tile Locks

Keith Moss Keith.Moss at landgate.wa.gov.au
Sun Jan 6 20:33:26 PST 2013


Hi list,



I've got a bit of a bizarre issue with MapServer holding locks on MapProxy tiles.



Our setup is: 4 x Windows Server 2008 running MapProxy 1.5.0 via WSGI in Apache, 1 x Windows Server 2008 running mapproxy-seed.exe in scheduled tasks, 1 x Windows Server 2008 storing the .yaml config files.



Our four MapProxy instances are using sources of the WMS type that point back to the MapServer .exe locally i.e. http://localhost/cgi-bin/mapserv.exe?map=something.map



In our log files from MapProxy and from mapproxy-seed we're periodically getting errors from lock.py line 124, e.g.



[12:17:04]  7  75.00% 13775786.98567, -5465442.18332, 15654303.39280, -5009377.0
8570 (477 tiles) ETA: 2013-01-07-12:17:25
Exception in thread Thread-2:
Traceback (most recent call last):
  File "C:\Python27\Lib\threading.py", line 554, in __bootstrap_inner
    self.run()
  File "c:\pythonenv\mapproxy-srss\lib\site-packages\mapproxy-1.5.0a_20130107-py
2.7.egg\mapproxy\seed\seeder.py", line 92, in run
    self.work_loop()
  File "c:\pythonenv\mapproxy-srss\lib\site-packages\mapproxy-1.5.0a_20130107-py
2.7.egg\mapproxy\seed\seeder.py", line 104, in work_loop
    exceptions=(SourceError, IOError), ignore_exceptions=(LockTimeout, ))
  File "c:\pythonenv\mapproxy-srss\lib\site-packages\mapproxy-1.5.0a_20130107-py
2.7.egg\mapproxy\seed\util.py", line 222, in exp_backoff
    result = func(*args, **kw)
  File "c:\pythonenv\mapproxy-srss\lib\site-packages\mapproxy-1.5.0a_20130107-py
2.7.egg\mapproxy\cache\tile.py", line 126, in load_tile_coords
    created_tiles = creator.create_tiles(uncached_tiles)
  File "c:\pythonenv\mapproxy-srss\lib\site-packages\mapproxy-1.5.0a_20130107-py
2.7.egg\mapproxy\cache\tile.py", line 227, in create_tiles
    created_tiles = self._create_meta_tiles(meta_tiles)
  File "c:\pythonenv\mapproxy-srss\lib\site-packages\mapproxy-1.5.0a_20130107-py
2.7.egg\mapproxy\cache\tile.py", line 300, in _create_meta_tiles
    created_tiles.extend(self._create_meta_tile(meta_tile))
  File "c:\pythonenv\mapproxy-srss\lib\site-packages\mapproxy-1.5.0a_20130107-py
2.7.egg\mapproxy\cache\tile.py", line 307, in _create_meta_tile
    with self.tile_mgr.lock(main_tile):
  File "c:\pythonenv\mapproxy-srss\lib\site-packages\mapproxy-1.5.0a_20130107-py
2.7.egg\mapproxy\cache\tile.py", line 143, in lock
    return self.cache.lock(tile)
  File "c:\pythonenv\mapproxy-srss\lib\site-packages\mapproxy-1.5.0a_20130107-py
2.7.egg\mapproxy\cache\base.py", line 115, in lock
    cleanup_lockdir(self.lock_dir, force=False)
  File "c:\pythonenv\mapproxy-srss\lib\site-packages\mapproxy-1.5.0a_20130107-py
2.7.egg\mapproxy\platform\cpython\lock.py", line 124, in cleanup_lockdir
    raise e
WindowsError: [Error 32] The process cannot access the file because it is being
used by another process: '\\\\10.0.0.70\\c_drive\\mapproxy\\cache\\layer7_fhs_la
st_0_72.shp_EPSG900913\\tile_locks\\1d5b8827382a79fba940cc62e989aead-14883-6072-
14.lck'



Using Process Explorer I've managed to track the file locks down to the mapserv.exe process. In a typical case mapserv.exe will have locks on a PNG and a few of the .lck files. My understanding was that there's no link between the sources and the PNG tiles that MapProxy creates, so I'm at somewhat of a loss as to how mapserv.exe can come to have any knowledge of these PNG and .lck files.



One pretty out-there thought we've had was that perhaps it's something to do with mapproxy-seed, Apache, and MapProxy all using the same user account and somehow because of that there's some shared file handle issue.



Am I missing something obvious here? :)



Cheers,



Keith



__________________________________
Keith Moss
Satellite Remote Sensing Services
Operations
Landgate
65 Brockway Road, FLOREAT WA 6014
PO Box 741 Wembley WA 6913
Ph. (08) 9387 0332 | Fx. (08) 9383 7142
keith.moss at landgate.wa.gov.au<mailto:keith.moss at landgate.wa.gov.au>
http://www.landgate.wa.gov.au/

This e-mail and any files transmitted with it are intended only for the use of the addressee(s). It may contain information that is confidential and privileged, in which case neither is intended to be waived or lost by mistaken delivery to you. If you are not an intended recipient, any use, interference with, disclosure, distribution or copying of this material is unauthorised and prohibited. If you receive this e-mail in error, please notify the sender by return e-mail and delete the message and any attachments from your system. Unless specifically indicated, this e-mail does not constitute formal advice or commitment by the sender or the Western Australian Land Information Authority (Landgate). Information in this message not relating to the official business of Landgate shall be understood as neither given nor endorsed by it. It is your responsibility to check any attachments for viruses and defects before opening or sending them on. Landgate’s liability is limited to re-supplying affected attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20130107/2b0c407a/attachment.html>


More information about the MapProxy mailing list