Ok, apparently i was using the wrong path when i fetched and build the source from github :). Either way<div><div>MapServer version 6.1-dev OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE</div>
<div><br></div><div>And that seems to work perfectly :).</div><div><br></div><div>Thanks for your help.</div><div><br></div><br><div class="gmail_quote">2012/5/11 thomas bonfort <span dir="ltr">&lt;<a href="mailto:thomas.bonfort@gmail.com" target="_blank">thomas.bonfort@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fri, May 11, 2012 at 11:32 AM, Peter Maes &lt;<a href="mailto:thxftw@gmail.com">thxftw@gmail.com</a>&gt; wrote:<br>

&gt; Hi,<br>
&gt;<br>
&gt; Thanks again for your answer Thomas.<br>
&gt;<br>
&gt; I have seen that issue report and I am using mapserver latest version (6.0.2<br>
&gt; (which is what you meant? or is there an actual 6.2 somewhere)<br>
&gt;<br>
<br>
</div>no, 6.2 is the one. You&#39;ll have to build from github master if you<br>
want to use it.<br>
<div class="HOEnZb"><div class="h5"><br>
&gt; It does indeed keep working if i reference a good map and hammer F5.<br>
&gt;<br>
&gt; Although: when i for instance call a wrong mapfile and hammer that it will<br>
&gt; also kill the processes. Is there a workaround for this? Otherwise people<br>
&gt; can just execute denial of service attacks on my mapserver.<br>
&gt;<br>
&gt; We&#39;re already using nginx for static file hosting. It would be great if i<br>
&gt; could get a production ready mapserver environment there as well.<br>
&gt;<br>
&gt;<br>
&gt; 2012/5/11 thomas bonfort &lt;<a href="mailto:thomas.bonfort@gmail.com">thomas.bonfort@gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; You might want to have a look at<br>
&gt;&gt; <a href="https://github.com/mapserver/mapserver/issues/3099" target="_blank">https://github.com/mapserver/mapserver/issues/3099</a><br>
&gt;&gt;<br>
&gt;&gt; tl;dr<br>
&gt;&gt;  - mapserver fastcgi calls exit() when running in an error condition,<br>
&gt;&gt; which causes some fastcgi spawning managers to have issues<br>
&gt;&gt;  - mapserver 6.2 (current git master) has been refactored to greatly<br>
&gt;&gt; minimize the exit() occurences (basically only on memory allocation<br>
&gt;&gt; errors)<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; thomas<br>
&gt;&gt;<br>
&gt;&gt; On Fri, May 11, 2012 at 10:42 AM, Peter Maes &lt;<a href="mailto:thxftw@gmail.com">thxftw@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Hello,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I&#39;m trying to run mapserver on nginx (fastcgi), but after 2 days booked<br>
&gt;&gt; &gt; little success.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 1. I&#39;ve compiled mapserv with fastcgi support and validated this<br>
&gt;&gt; &gt; 2. I created a spawn-fcgi startup script based on this<br>
&gt;&gt; &gt; : <a href="http://osgeo-org.1560.n6.nabble.com/Mapserver-on-nginx-td4226669.html" target="_blank">http://osgeo-org.1560.n6.nabble.com/Mapserver-on-nginx-td4226669.html</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; It now looks like this:<br>
&gt;&gt; &gt; ----<br>
&gt;&gt; &gt; #!/bin/sh<br>
&gt;&gt; &gt; MAPSERV_PORT=9001<br>
&gt;&gt; &gt; USER=www-data<br>
&gt;&gt; &gt; DAEMON=/usr/local/bin/mapserv<br>
&gt;&gt; &gt; CHILDREN=5<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; # the -F switch of spawn-fcg does not work when the -n swich<br>
&gt;&gt; &gt; # is set. using multiwatch instead<br>
&gt;&gt; &gt; # see <a href="http://manpages.ubuntu.com/manpages/lucid/man1/spawn-fcgi.1.html" target="_blank">http://manpages.ubuntu.com/manpages/lucid/man1/spawn-fcgi.1.html</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; exec setuidgid $USER spawn-fcgi \<br>
&gt;&gt; &gt;   -a 127.0.0.1 \<br>
&gt;&gt; &gt;   -p $MAPSERV_PORT \<br>
&gt;&gt; &gt;   -u $USER \<br>
&gt;&gt; &gt;   /usr/bin/multiwatch -f $CHILDREN $DAEMON<br>
&gt;&gt; &gt; ----<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; In Nginx its called like this:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;        location /mapserver/ {<br>
&gt;&gt; &gt;                 include /etc/nginx/fastcgi_params;<br>
&gt;&gt; &gt;                 fastcgi_pass <a href="http://127.0.0.1:9001" target="_blank">127.0.0.1:9001</a>;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;                 fastcgi_param SCRIPT_FILENAME<br>
&gt;&gt; &gt; /usr/local/run/spawnscript;<br>
&gt;&gt; &gt;                 fastcgi_param PATH_INFO /usr/local/run/ spawnscript;<br>
&gt;&gt; &gt;         }<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; When i try to connect to /mapserver in my browser, i get an error<br>
&gt;&gt; &gt; stating<br>
&gt;&gt; &gt; 502 Bad gateway.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; So i tried starting the spawn script<br>
&gt;&gt; &gt; manually: /usr/local/run/spawnscript .<br>
&gt;&gt; &gt; When i then try to connect using browser it works fine for a short<br>
&gt;&gt; &gt; while. On<br>
&gt;&gt; &gt; the console it logs this error:<br>
&gt;&gt; &gt; Spawing child[0] failed, next try<br>
&gt;&gt; &gt; Child[1] died, respawn<br>
&gt;&gt; &gt; Child[2] died, respawn<br>
&gt;&gt; &gt; Child[3] died, respawn<br>
&gt;&gt; &gt; Child[4] died, respawn<br>
&gt;&gt; &gt; Child[0] died, respawn<br>
&gt;&gt; &gt; Spawing child[1] failed, next try<br>
&gt;&gt; &gt; Spawing child[2] failed, next try<br>
&gt;&gt; &gt; Spawing child[3] failed, next try<br>
&gt;&gt; &gt; Spawing child[4] failed, next try<br>
&gt;&gt; &gt; Spawing child[0] failed, next try<br>
&gt;&gt; &gt; Spawing child[1] failed, next try<br>
&gt;&gt; &gt; Spawing child[2] failed, next try<br>
&gt;&gt; &gt; Spawing child[3] failed, next try<br>
&gt;&gt; &gt; Spawing child[4] failed, next try<br>
&gt;&gt; &gt; Spawing child[0] failed, next try<br>
&gt;&gt; &gt; Spawing child[1] failed, next try<br>
&gt;&gt; &gt; Spawing child[2] failed, next try<br>
&gt;&gt; &gt; Spawing child[3] failed, next try<br>
&gt;&gt; &gt; Spawing child[4] failed, next try<br>
&gt;&gt; &gt; Spawing child[0] failed, next try<br>
&gt;&gt; &gt; Spawing child[1] failed, next try<br>
&gt;&gt; &gt; Child[1] died to often, not forking again<br>
&gt;&gt; &gt; Spawing child[2] failed, next try<br>
&gt;&gt; &gt; Child[2] died to often, not forking again<br>
&gt;&gt; &gt; Spawing child[3] failed, next try<br>
&gt;&gt; &gt; Child[3] died to often, not forking again<br>
&gt;&gt; &gt; Spawing child[4] failed, next try<br>
&gt;&gt; &gt; Child[4] died to often, not forking again<br>
&gt;&gt; &gt; Spawing child[0] failed, next try<br>
&gt;&gt; &gt; Child[0] died to often, not forking again<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; After which the process exits and I revert to the 502 Bad gateway.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; What am I missing here? :).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks for any tips. I&#39;m not that experienced with spawn-fcgi.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; mapserver-users mailing list<br>
&gt;&gt; &gt; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt;&gt; &gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div>