<div dir="ltr">For reference it works just fine for me using aiohttp (-k gaiohttp) and gunicorn verison 19.6.0.<div><br></div><div>Additionally, try to start gunicorn with the  --preload argument - sometimes it helps to pin down an issue.</div><div><br></div><div>Cheers,</div><div>Attila</div></div><br><div class="gmail_quote"><div dir="ltr">Andrew Terry <<a href="mailto:andrew.terry@centremaps.co.uk">andrew.terry@centremaps.co.uk</a>> ezt írta (időpont: 2017. febr. 9., Cs, 14:39):<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div class="gmail_msg">
<div dir="auto" class="gmail_msg">
<div dir="auto" class="gmail_msg"></div>
<div class="gmail_msg">Hi <span style="font-family:sans-serif;font-size:13.696px" class="gmail_msg">Märt</span></div>
<div dir="auto" class="gmail_msg"><font face="sans-serif" class="gmail_msg"><span style="font-size:13.696px" class="gmail_msg"><br class="gmail_msg">
</span></font></div>
<div dir="auto" class="gmail_msg"><font face="sans-serif" class="gmail_msg"><span style="font-size:13.696px" class="gmail_msg">There's definitely an issue with gunicorn 19 which has been picked up previously. You should find switching to 18.0 helps.</span></font></div>
<div dir="auto" class="gmail_msg"><font face="sans-serif" class="gmail_msg"><span style="font-size:13.696px" class="gmail_msg"><br class="gmail_msg">
</span></font></div>
<div dir="auto" class="gmail_msg"><font face="sans-serif" class="gmail_msg"><span style="font-size:13.696px" class="gmail_msg">Thanks for the systemd note, I did get it working in the end (with gevent). I'm using Ubuntu xenial in case that's any use.</span></font></div>
<div dir="auto" class="gmail_msg"><font face="sans-serif" class="gmail_msg"><span style="font-size:13.696px" class="gmail_msg"><br class="gmail_msg">
</span></font></div>
<div dir="auto" class="gmail_msg"><font face="sans-serif" class="gmail_msg"><span style="font-size:13.696px" class="gmail_msg">Cheers</span></font></div>
<div dir="auto" class="gmail_msg"><font face="sans-serif" class="gmail_msg"><span style="font-size:13.696px" class="gmail_msg"><br class="gmail_msg">
</span></font></div>
<div dir="auto" class="gmail_msg"><font face="sans-serif" class="gmail_msg"><span style="font-size:13.696px" class="gmail_msg">Andy<br class="gmail_msg">
</span></font>
<div class="m_-395865640123717103elided-text gmail_msg" dir="auto"> 
<blockquote style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex" class="gmail_msg">
<div class="gmail_msg">
<div class="gmail_msg"><br class="gmail_msg">
Message: 1<br class="gmail_msg">
Date: Wed, 8 Feb 2017 22:10:14 +0000<br class="gmail_msg">
From: Märt Reose <<a href="mailto:Mart.Reose@smit.ee" class="gmail_msg" target="_blank">Mart.Reose@smit.ee</a>><br class="gmail_msg">
To: "<a href="mailto:MapProxy@lists.osgeo.org" class="gmail_msg" target="_blank">MapProxy@lists.osgeo.org</a>" <<a href="mailto:MapProxy@lists.osgeo.org" class="gmail_msg" target="_blank">MapProxy@lists.osgeo.org</a>><br class="gmail_msg">
Subject: Re: [MapProxy] eventlet error<br class="gmail_msg">
Message-ID:<br class="gmail_msg">
        <<a href="mailto:2841D7977834174EBD3BCC102C914FD50121E6F564@EX-MB1.meie.politsei.ee" class="gmail_msg" target="_blank">2841D7977834174EBD3BCC102C914FD50121E6F564@EX-MB1.meie.politsei.ee</a>><br class="gmail_msg">
Content-Type: text/plain; charset="utf-8"<br class="gmail_msg">
<br class="gmail_msg">
Funny, I am having issues with demo site with gevent and without it. Using mapproxy 1.9.0 and gunicorn 19.6.0.<br class="gmail_msg">
<br class="gmail_msg">
>From browser:<br class="gmail_msg">
GET <a href="http://mapservice.smit.dev/mapproxy/demo/static/site.css" class="gmail_msg" target="_blank">http://mapservice.smit.dev/mapproxy/demo/static/site.css</a> net::ERR_CONTENT_LENGTH_MISMATCH<br class="gmail_msg">
(index):12 GET <a href="http://mapservice.smit.dev/mapproxy/demo/static/logo.png" class="gmail_msg" target="_blank">
http://mapservice.smit.dev/mapproxy/demo/static/logo.png</a> net::ERR_CONTENT_LENGTH_MISMATCH<br class="gmail_msg">
favicon.ico:1 GET <a href="http://mapservice.smit.dev/favicon.ico" class="gmail_msg" target="_blank">http://mapservice.smit.dev/favicon.ico</a> 404 (Not Found)<br class="gmail_msg">
<br class="gmail_msg">
>From log:<br class="gmail_msg">
[2017-02-08 23:48:26 +0000] [24056] [CRITICAL] WORKER TIMEOUT (pid:24062)<br class="gmail_msg">
[2017-02-08 23:48:26 +0000] [24056] [CRITICAL] WORKER TIMEOUT (pid:24063)<br class="gmail_msg">
<br class="gmail_msg">
Tried with keeping only wms and demo service. But same thing.<br class="gmail_msg">
Installed mime types, still the same thing.<br class="gmail_msg">
<br class="gmail_msg">
Strace is attached. (strace and the log are done at different times, the pids wont match, but contents are the same)<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
About systemd, gunicorn-s manual has an example using unix sockets: <a href="http://docs.gunicorn.org/en/stable/deploy.html" class="gmail_msg" target="_blank">
http://docs.gunicorn.org/en/stable/deploy.html</a><br class="gmail_msg">
<br class="gmail_msg">
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.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
Märt<br class="gmail_msg">
<br class="gmail_msg">
From: MapProxy [<a href="mailto:mapproxy-bounces@lists.osgeo.org" class="gmail_msg" target="_blank">mailto:mapproxy-bounces@lists.osgeo.org</a>] On Behalf Of Andrew Terry<br class="gmail_msg">
Sent: Wednesday, February 08, 2017 8:48 PM<br class="gmail_msg">
To: <a href="mailto:MapProxy@lists.osgeo.org" class="gmail_msg" target="_blank">MapProxy@lists.osgeo.org</a><br class="gmail_msg">
Subject: Re: [MapProxy] eventlet error<br class="gmail_msg">
<br class="gmail_msg">
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.<br class="gmail_msg">
<br class="gmail_msg">
Much appreciated, might be a useful update to the documentation for others?<br class="gmail_msg">
<br class="gmail_msg">
Andy<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
Subject: Re: [MapProxy] eventlet error<br class="gmail_msg">
<br class="gmail_msg">
Pretty basic setup<br class="gmail_msg">
<br class="gmail_msg">
cat /etc/systemd/system/mapproxy.service<br class="gmail_msg">
[Unit]<br class="gmail_msg">
Description=Gunicorn instance to serve MapProxy<br class="gmail_msg">
After=network.target<br class="gmail_msg">
<br class="gmail_msg">
[Service]<br class="gmail_msg">
User=nginx<br class="gmail_msg">
Group=nginx<br class="gmail_msg">
WorkingDirectory=/opt/mapproxy_conf/conf<br class="gmail_msg">
ExecStart=/usr/bin/gunicorn -t 60 -k eventlet -w 5 -b localhost:8080 config:application<br class="gmail_msg">
<br class="gmail_msg">
[Install]<br class="gmail_msg">
WantedBy=multi-user.target<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
On 7 February 2017 at 17:13, Andrew Terry <<a href="mailto:andrew.terry@centremaps.co.uk" class="gmail_msg" target="_blank">andrew.terry@centremaps.co.uk</a><mailto:<a href="mailto:andrew.terry@centremaps.co.uk" class="gmail_msg" target="_blank">andrew.terry@centremaps.co.uk</a>>> wrote:<br class="gmail_msg">
Hi, thanks for the response. Yes, I’m using 1.9.<br class="gmail_msg">
<br class="gmail_msg">
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.<br class="gmail_msg">
<br class="gmail_msg">
Would greatly appreciate an example of a systemd service config if you have one you can share<br class="gmail_msg">
<br class="gmail_msg">
Andy<br class="gmail_msg">
<br class="gmail_msg">
Subject: Re: [MapProxy] eventlet error<br class="gmail_msg">
<br class="gmail_msg">
Are you using mapproxy 1.9?  Could the issue be this - <a href="https://github.com/mapproxy/mapproxy/issues/239" class="gmail_msg" target="_blank">
https://github.com/mapproxy/mapproxy/issues/239</a><br class="gmail_msg">
<br class="gmail_msg">
BTW centos 7+ is the same requiring the use of systemd instead of upstart<br class="gmail_msg">
<br class="gmail_msg">
On 7 February 2017 at 07:44, Andrew Terry <<a href="mailto:andrew.terry@centremaps.co.uk" class="gmail_msg" target="_blank">andrew.terry@centremaps.co.uk</a><mailto:<a href="mailto:andrew.terry@centremaps.co.uk" class="gmail_msg" target="_blank">andrew.terry@centremaps.co.uk</a>>> wrote:<br class="gmail_msg">
Hi,<br class="gmail_msg">
<br class="gmail_msg">
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”.<br class="gmail_msg">
<br class="gmail_msg">
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.<br class="gmail_msg">
<br class="gmail_msg">
Also now creating a systemd startup as it seems the old init is discontinued in xenial (without installing upstart).<br class="gmail_msg">
<br class="gmail_msg">
Andy<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
MapProxy mailing list<br class="gmail_msg">
<a href="mailto:MapProxy@lists.osgeo.org" class="gmail_msg" target="_blank">MapProxy@lists.osgeo.org</a><mailto:<a href="mailto:MapProxy@lists.osgeo.org" class="gmail_msg" target="_blank">MapProxy@lists.osgeo.org</a>><br class="gmail_msg">
<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" class="gmail_msg" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapproxy</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
-------------- next part --------------<br class="gmail_msg">
An HTML attachment was scrubbed...<br class="gmail_msg">
URL: <<a href="http://lists.osgeo.org/pipermail/mapproxy/attachments/20170208/004f552f/attachment.html" class="gmail_msg" target="_blank">http://lists.osgeo.org/pipermail/mapproxy/attachments/20170208/004f552f/attachment.html</a>><br class="gmail_msg">
-------------- next part --------------<br class="gmail_msg">
An embedded and charset-unspecified text was scrubbed...<br class="gmail_msg">
Name: mapproxy-demo-strace.txt<br class="gmail_msg">
URL: <<a href="http://lists.osgeo.org/pipermail/mapproxy/attachments/20170208/004f552f/attachment.txt" class="gmail_msg" target="_blank">http://lists.osgeo.org/pipermail/mapproxy/attachments/20170208/004f552f/attachment.txt</a>><br class="gmail_msg">
<br class="gmail_msg">
------------------------------<br class="gmail_msg">
<br class="gmail_msg">
Subject: Digest Footer<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
MapProxy mailing list<br class="gmail_msg">
<a href="mailto:MapProxy@lists.osgeo.org" class="gmail_msg" target="_blank">MapProxy@lists.osgeo.org</a><br class="gmail_msg">
<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" class="gmail_msg" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapproxy</a><br class="gmail_msg">
<br class="gmail_msg">
------------------------------<br class="gmail_msg">
<br class="gmail_msg">
End of MapProxy Digest, Vol 84, Issue 9<br class="gmail_msg">
***************************************<br class="gmail_msg">
</div>
</div>
</blockquote>
</div>
<br class="gmail_msg">
</div>
</div>
</div>

_______________________________________________<br class="gmail_msg">
MapProxy mailing list<br class="gmail_msg">
<a href="mailto:MapProxy@lists.osgeo.org" class="gmail_msg" target="_blank">MapProxy@lists.osgeo.org</a><br class="gmail_msg">
<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapproxy</a></blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><span>BERÉNYI Attila, PhD</span><div>ügyvezető </div><div><br></div><div>GISLab Consulting Kft.<br></div><div>H-1031 Budapest, Kadosa utca 59.</div><div><br></div><div>M: +36 20 457 1800</div><div>W: <a>http://gislab.hu</a></div></div></div>