[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] mod_wsgi (pid=30426):
Exception occurred processing WSGI script
[Sun Dec 14 07:20:12.598992 2014] [:error] [pid 30426:tid
140672961599232] [remote] Traceback (most recent
call last):
[Sun Dec 14 07:20:12.599006 2014] [:error] [pid 30426:tid
140672961599232] [remote]   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]     application =
[Sun Dec 14 07:20:12.599051 2014] [:error] [pid 30426:tid
140672961599232] [remote]   File
line 104, in make_wsgi_app
[Sun Dec 14 07:20:12.611874 2014] [:error] [pid 30426:tid
140672961599232] [remote]     conf =
[Sun Dec 14 07:20:12.611911 2014] [:error] [pid 30426:tid
140672961599232] [remote]   File
line 1597, in load_configuration
[Sun Dec 14 07:20:12.612738 2014] [:error] [pid 30426:tid
140672961599232] [remote]     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]   File
line 1621, in load_configuration_file
[Sun Dec 14 07:20:12.612767 2014] [:error] [pid 30426:tid
140672961599232] [remote]     if 'base' in
[Sun Dec 14 07:20:12.612781 2014] [:error] [pid 30426:tid
140672961599232] [remote] 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
processes=2 user=mapproxy
    WSGIApplicationGroup %{SERVER}

Anybody any ideas?


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