[MapProxy] Issue with mapproxy, apache2 and wsgi

Simon Poole simon at poole.ch
Sun Dec 14 01:48:47 PST 2014


We've been running a mapproxy instance for a good two and a half years,
mainly as a proxy between WMS servers and clients that can only consume
tiles. We've had a frequent and annoying issue that mapproxy will
suddenly return "500" errors for any requests which will go away after
restarting apache.

Over time we've used a number of different versions of everything
involved, currently the service is running on Ubuntu 14.04, mapproxy
1.7.1 and apache 2.4.7.

When the error occurs we get the following in the log:

[Sun Dec 14 07:20:12.598975 2014] [:error] [pid 30426:tid
140672961599232] [remote 153.189.116.228:46594] mod_wsgi (pid=30426):
Exception occurred processing WSGI script
'/srv/mapproxy.osm.ch/config/wsgi.py'.
[Sun Dec 14 07:20:12.598992 2014] [:error] [pid 30426:tid
140672961599232] [remote 153.189.116.228:46594] Traceback (most recent
call last):
[Sun Dec 14 07:20:12.599006 2014] [:error] [pid 30426:tid
140672961599232] [remote 153.189.116.228:46594]   File
"/srv/mapproxy.osm.ch/config/wsgi.py", line 12, in <module>
[Sun Dec 14 07:20:12.599042 2014] [:error] [pid 30426:tid
140672961599232] [remote 153.189.116.228:46594]     application =
make_wsgi_app(r'/srv/mapproxy.osm.ch/config/sosm.yaml')
[Sun Dec 14 07:20:12.599051 2014] [:error] [pid 30426:tid
140672961599232] [remote 153.189.116.228:46594]   File
"/srv/mapproxy.osm.ch/venv/lib/python2.7/site-packages/mapproxy/wsgiapp.py",
line 104, in make_wsgi_app
[Sun Dec 14 07:20:12.611874 2014] [:error] [pid 30426:tid
140672961599232] [remote 153.189.116.228:46594]     conf =
load_configuration(mapproxy_conf=services_conf,
ignore_warnings=ignore_config_warnings)
[Sun Dec 14 07:20:12.611911 2014] [:error] [pid 30426:tid
140672961599232] [remote 153.189.116.228:46594]   File
"/srv/mapproxy.osm.ch/venv/lib/python2.7/site-packages/mapproxy/config/loader.py",
line 1597, in load_configuration
[Sun Dec 14 07:20:12.612738 2014] [:error] [pid 30426:tid
140672961599232] [remote 153.189.116.228:46594]     conf_dict =
load_configuration_file([os.path.basename(mapproxy_conf)], conf_base_dir)
[Sun Dec 14 07:20:12.612752 2014] [:error] [pid 30426:tid
140672961599232] [remote 153.189.116.228:46594]   File
"/srv/mapproxy.osm.ch/venv/lib/python2.7/site-packages/mapproxy/config/loader.py",
line 1621, in load_configuration_file
[Sun Dec 14 07:20:12.612767 2014] [:error] [pid 30426:tid
140672961599232] [remote 153.189.116.228:46594]     if 'base' in
current_dict:
[Sun Dec 14 07:20:12.612781 2014] [:error] [pid 30426:tid
140672961599232] [remote 153.189.116.228:46594] TypeError: argument of
type 'NoneType' is not iterable


Note it doesn't seem to be linked to a specific request happening and as
said, restarting apache2 will allow the service to work normally again.

For completeness sake, the relevant part of the apache config:

   WSGIScriptAlias / /srv/mapproxy.osm.ch/config/wsgi.py
    WSGIProcessGroup mapproxy
    WSGIDaemonProcess mapproxy
python-path=/srv/mapproxy.osm.ch/venv/lib/python2.7/site-packages
processes=2 user=mapproxy
    WSGIApplicationGroup %{SERVER}


Anybody any ideas?

Simon

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20141214/d6e740ff/attachment.pgp>


More information about the MapProxy mailing list