<div dir="ltr">This is another bug - <a href="http://osgeo-org.1560.x6.nabble.com/MapProxy-tms-request-via-gunicorn-td5284583.html">http://osgeo-org.1560.x6.nabble.com/MapProxy-tms-request-via-gunicorn-td5284583.html</a><div>you have to revert to gunicorn 1.8.X</div><div><br></div><div>Glad to see we all are running into the same issues :) </div></div><div class="gmail_extra"><br><div class="gmail_quote">On 8 February 2017 at 17:10, Märt Reose <span dir="ltr"><<a href="mailto:Mart.Reose@smit.ee" target="_blank">Mart.Reose@smit.ee</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="ET" link="blue" vlink="purple">
<div class="m_-5888344313688348329WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Funny, I am having issues with demo site with gevent and without it. Using mapproxy 1.9.0 and gunicorn 19.6.0.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">From browser:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">GET <a href="http://mapservice.smit.dev/mapproxy/demo/static/site.css" target="_blank">http://mapservice.smit.dev/<wbr>mapproxy/demo/static/site.css</a> net::ERR_CONTENT_LENGTH_<wbr>MISMATCH<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">(index):12 GET <a href="http://mapservice.smit.dev/mapproxy/demo/static/logo.png" target="_blank">http://mapservice.smit.dev/<wbr>mapproxy/demo/static/logo.png</a> net::ERR_CONTENT_LENGTH_<wbr>MISMATCH<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">favicon.ico:1 GET <a href="http://mapservice.smit.dev/favicon.ico" target="_blank">http://mapservice.smit.dev/<wbr>favicon.ico</a> 404 (Not Found)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">From log:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">[2017-02-08 23:48:26 +0000] [24056] [CRITICAL] WORKER TIMEOUT (pid:24062)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">[2017-02-08 23:48:26 +0000] [24056] [CRITICAL] WORKER TIMEOUT (pid:24063)<br>
<br>
Tried with keeping only wms and demo service. But same thing.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Installed mime types, still the same thing.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Strace is attached. (strace and the log are done at different times, the pids wont match, but contents are the same)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">About systemd, gunicorn-s manual has an example using unix sockets: <a href="http://docs.gunicorn.org/en/stable/deploy.html" target="_blank">http://docs.gunicorn.org/en/<wbr>stable/deploy.html</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I am running basically what gunicorn has specified, but without unix socket and with the -b localhost:8080. Everything works perfectly,
but not the demo site.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Märt<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> MapProxy [mailto:<a href="mailto:mapproxy-bounces@lists.osgeo.org" target="_blank">mapproxy-bounces@<wbr>lists.osgeo.org</a>]
<b>On Behalf Of </b>Andrew Terry<br>
<b>Sent:</b> Wednesday, February 08, 2017 8:48 PM<br>
<b>To:</b> <a href="mailto:MapProxy@lists.osgeo.org" target="_blank">MapProxy@lists.osgeo.org</a></span></p><div><div class="h5"><br>
<b>Subject:</b> Re: [MapProxy] eventlet error<u></u><u></u></div></div><p></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Thanks Travis, it’s very hard to know where you’re failing with that systemd until you’ve done it once. I almost had it sorted, just
a permissions issue on the User/Group.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Much appreciated, might be a useful update to the documentation for others?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Andy<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><br>
<b>Subject:</b> Re: [MapProxy] eventlet error<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Pretty basic setup<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">cat /etc/systemd/system/mapproxy.<wbr>service<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">[Unit]<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Description=Gunicorn instance to serve MapProxy<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">After=network.target<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">[Service]<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">User=nginx<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Group=nginx<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">WorkingDirectory=/opt/<wbr>mapproxy_conf/conf<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">ExecStart=/usr/bin/gunicorn -t 60 -k eventlet -w 5 -b localhost:8080 config:application<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">[Install]<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">WantedBy=multi-user.target<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB">On 7 February 2017 at 17:13, Andrew Terry <<a href="mailto:andrew.terry@centremaps.co.uk" target="_blank">andrew.terry@centremaps.co.uk</a><wbr>> wrote:<u></u><u></u></span></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Hi, thanks for the response. Yes, I’m using 1.9.</span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">If I’m reading that example correctly, the issue there shows as a failing of an osm layer. This however
is that the openlayers implementation isn’t getting called through. Runs ok with gevent or no -k entry for gunicorn.</span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Would greatly appreciate an example of a systemd service config if you have one you can share</span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Andy</span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span></b><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Subject:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">
Re: [MapProxy] eventlet error</span><span lang="EN-GB"><u></u><u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB">Are you using mapproxy 1.9? Could the issue be this - <a href="https://github.com/mapproxy/mapproxy/issues/239" target="_blank">https://github.com/mapproxy/<wbr>mapproxy/issues/239</a><u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">BTW centos 7+ is the same requiring the use of systemd instead of upstart<u></u><u></u></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB">On 7 February 2017 at 07:44, Andrew Terry <<a href="mailto:andrew.terry@centremaps.co.uk" target="_blank">andrew.terry@centremaps.co.uk</a><wbr>> wrote:<u></u><u></u></span></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Just setting up on Ubuntu xenial and generally everything working fine. Oddly though, with gunicorn (18.0) and eventlet I get an error loading the openlayers
in the browser demo. Shows “ReferenceError: OpenLayers is not defined”.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">However, using gevent instead of eventlet or not specifying anything does work. I plan to continue with gevent in place but happy to hear if anyone knows the
issue.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="color:black"> </span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="color:black">Also now creating a systemd startup as it seems the old init is discontinued in xenial (without installing upstart).</span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="color:black"> </span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="color:black">Andy</span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"> <u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-GB"><br>
______________________________<wbr>_________________<br>
MapProxy mailing list<br>
<a href="mailto:MapProxy@lists.osgeo.org" target="_blank">MapProxy@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/mapproxy</a><u></u><u></u></span></p>
</blockquote>
</div>
<p class="MsoNormal"><span lang="EN-GB"> <u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
</div>
</div></div></div>
</div>
<br>______________________________<wbr>_________________<br>
MapProxy mailing list<br>
<a href="mailto:MapProxy@lists.osgeo.org">MapProxy@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/mapproxy</a><br></blockquote></div><br></div>