<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Hi Rob,<br></div><div><br></div><div>More details on the PROJ6 performance implications at <a href="https://www.mapserver.org/development/rfc/ms-rfc-126.html#performance-implications">https://www.mapserver.org/development/rfc/ms-rfc-126.html#performance-implications</a><br></div><div><br></div><div>As Jeff wrote if you can recreate with shp2img or mapserv then it can rule out MapScript. A minimal MAP file and dataset would then be required to debug further. <br></div><div><br></div><div>Do you create a new mapscript.OWSRequest() object for each request?<br></div><div><br></div><div>Seth<br></div><div><br></div><div id="sig62266145"><div>--<br></div><div>web:http://geographika.co.uk<br></div><div>twitter: @geographika<br></div></div><div><br></div><div><br></div><div>On Mon, Oct 12, 2020, at 7:24 PM, Rob Marjot wrote:<br></div><blockquote type="cite" id="qt" style=""><div dir="ltr"><div class="qt-gmail_default" style="font-family:verdana, sans-serif;">Yes, I will.<br></div><div class="qt-gmail_default" style="font-family:verdana, sans-serif;"><br></div><div class="qt-gmail_default" style="font-family:verdana, sans-serif;">Any additional background information you can share on the adviced PROJ<6  (or PROJ<=6, e.g. the current 6.3.2)<br></div><div class="qt-gmail_default" style="font-family:verdana, sans-serif;"><br></div><div class="qt-gmail_default" style="font-family:verdana, sans-serif;">Thanks,<br></div><div class="qt-gmail_default" style="font-family:verdana, sans-serif;">Rob<br></div></div><div><br></div><div class="qt-gmail_quote"><div dir="ltr" class="qt-gmail_attr">Op ma 12 okt. 2020 om 19:17 schreef Jeff McKenna <<a href="mailto:jmckenna@gatewaygeomatics.com">jmckenna@gatewaygeomatics.com</a>>:<br></div><blockquote class="qt-gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;"><div>Hi Rob,<br></div><div> <br></div><div> Next I would remove the ECW support/reliance and try to trigger the <br></div><div> error without ECW data (yes with a local mapfile called from shp2img).<br></div><div> <br></div><div> Maybe others have ideas.<br></div><div> <br></div><div> -jeff<br></div><div> <br></div><div> <br></div><div> <br></div><div> -- <br></div><div> Jeff McKenna<br></div><div> MapServer Consulting and Training Services<br></div><div> co-founder of FOSS4G<br></div><div> <a href="http://gatewaygeo.com/" rel="noreferrer" target="_blank">http://gatewaygeo.com/</a><br></div><div> <br></div><div> <br></div><div> <br></div><div> On 2020-10-12 2:11 p.m., Rob Marjot wrote:<br></div><div> > Hi Jeff, all,<br></div><div> > <br></div><div> > Thank you for your thoughts on this. Can you elaborate on the PROJ<6 <br></div><div> > remark; serious performance hits?<br></div><div> > <br></div><div> > Indeed, I am on the NG (SWIG) MapScript. Trying with shp2img and mapserv <br></div><div> > -nh will require to have the equivalent .map file on disk; I will work <br></div><div> > on that soon.<br></div><div> > <br></div><div> > Taking a complete different approach, I have been able to reproduce the <br></div><div> > same problem by:<br></div><div> > 1. Installing *binaries* for MapServer 7.6.1, GDAL 3.1.3 and PROJ 7.1.1 <br></div><div> > from UbuntuGIS Unstable<br></div><div> > 2. Add ECW support through compiling the simple GDAL-plugin (tested: <br></div><div> > gdal_translate from ECW to GTiff works brilliantly)<br></div><div> > 3. Configured this to run in the context of 7.4 PHP-FPM<br></div><div> > <br></div><div> > Again the seg fault. Connecting to PHP-FPM from either Apache or NGINX <br></div><div> > does not make a difference, but that's no surprise.<br></div><div> > <br></div><div> > Rob<br></div><div> > <br></div><div> > Op ma 12 okt. 2020 om 15:38 schreef Jeff McKenna <br></div><div> > <<a href="mailto:jmckenna@gatewaygeomatics.com" target="_blank">jmckenna@gatewaygeomatics.com</a> <mailto:<a href="mailto:jmckenna@gatewaygeomatics.com" target="_blank">jmckenna@gatewaygeomatics.com</a>>>:<br></div><div> > <br></div><div> >     Hi Rob,<br></div><div> > <br></div><div> >     I'm not sure what is happening in your case, but make sure that you are<br></div><div> >     using the recommended PHP SWIG MapScript in your build<br></div><div> >     (-DWITH_PHPNG=1),<br></div><div> >     as the old PHP MapScript is unmaintained.<br></div><div> > <br></div><div> >     Some other thoughts:<br></div><div> > <br></div><div> >     - can you trigger this with shp2img at the commandline? (this will<br></div><div> >     remove MapScript/Apache/WMS from the equation)<br></div><div> >     <a href="https://mapserver.org/utilities/shp2img.html" rel="noreferrer" target="_blank">https://mapserver.org/utilities/shp2img.html</a><br></div><div> > <br></div><div> >     - also, try your GetMap request at the commandline with:<br></div><div> > <br></div><div> >           mapserv -nh<br></div><div> >     "QUERY_STRING=map=/ms4w/apps/local-demo/local-demo.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&..."<br></div><div> > <br></div><div> >       > ttt.png<br></div><div> > <br></div><div> >     But if I can speak openly here, I believe most production instances are<br></div><div> >     still running PROJ<6, so everyone is beginning to experiment with<br></div><div> >     settings of FCGI/PHP-FPM for GDAL3+PROJ7 (as there is a noticeable<br></div><div> >     performance hit with the new PROJ).<br></div><div> > <br></div><div> >     In other words, keep us posted here on your testing and configuration;<br></div><div> >     also, do consider documenting your configuration and workaround on the<br></div><div> >     MapServer wiki, so others can follow:<br></div><div> >     <a href="https://github.com/MapServer/MapServer/wiki" rel="noreferrer" target="_blank">https://github.com/MapServer/MapServer/wiki</a><br></div><div> > <br></div><div> >     Thanks Rob!<br></div><div> > <br></div><div> >     -jeff<br></div><div> > <br></div><div> > <br></div><div> > <br></div><div> >     -- <br></div><div> >     Jeff McKenna<br></div><div> >     MapServer Consulting and Training Services<br></div><div> >     co-founder of FOSS4G<br></div><div> >     <a href="http://gatewaygeo.com/" rel="noreferrer" target="_blank">http://gatewaygeo.com/</a><br></div><div> > <br></div><div> > <br></div><div> > <br></div><div> >     On 2020-10-09 9:44 p.m., Rob Marjot wrote:<br></div><div> >      > Hi All,<br></div><div> >      ><br></div><div> >      > I am running latest MapServer 7.6.1 compiled from source on<br></div><div> >     Ubuntu 20.04<br></div><div> >      > with (also from source):<br></div><div> >      > - proj-7.1.0<br></div><div> >      > - gdal-3.1.2<br></div><div> >      ><br></div><div> >      > Using the ppa:ondrej/php repo, I installed the following PHP<br></div><div> >     packages:<br></div><div> >      > php7.4 php7.4-fpm php7.4-dev<br></div><div> >      > Apache/2.4.41 proxies into the FPM over unix socket<br></div><div> >      ><br></div><div> >      > Compiling MapServer went smoothly and through the configuration<br></div><div> >     of the<br></div><div> >      > extension in PHP, MapScript is available. When I call (HTTP GET)<br></div><div> >     my PHP<br></div><div> >      > script to handle a WMS-formatted request [ OWSDispatch() ], the<br></div><div> >     first 2<br></div><div> >      > requests are handled fine (returns a rendered map image), but the<br></div><div> >     next<br></div><div> >      > two make the PHP-FPM crash:<br></div><div> >      > /var/log/syslog:<br></div><div> >      > Oct 10 01:59:25 as02 kernel: [3663532.034251] php-fpm7.4[1260175]:<br></div><div> >      > segfault at 28 ip 00007fbce21fb3eb sp 00007ffe87f600e0 error 6 in<br></div><div> >      > libgdal.so.27.0.2[7fbce152e000+d50000]<br></div><div> >      > Oct 10 01:59:25 as02 kernel: [3663532.034262] Code: 8b 15 81 de<br></div><div> >     56 00 e9<br></div><div> >      > 24 2d 38 ff 0f 1f 40 00 f3 0f 1e fa 41 54 49 89 f4 55 48 89 d5 53<br></div><div> >     89 fb<br></div><div> >      > 48 89 cf e8 e8 f0 ff ff 48 63 fb <4c> 89 24 f8 48 89 ac f8 00 01<br></div><div> >     00 00<br></div><div> >      > 5b 5d 41 5c c3 0f 1f 40 00 f3<br></div><div> >      ><br></div><div> >      > What could be the problem? Any help is much appreciated.<br></div><div> >      ><br></div><div> >      > Best,<br></div><div> >      > Rob Marjot<br></div><div> >      ><br></div><div> >      ><br></div><div> >     _______________________________________________<br></div><div> >     mapserver-users mailing list<br></div><div> >     <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a> <mailto:<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>><br></div><div> >     <a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div><div> > <br></div><div> > <br></div><div> > _______________________________________________<br></div><div> > mapserver-users mailing list<br></div><div> > <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br></div><div> > <a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div><div> > <br></div><div> <br></div><div> _______________________________________________<br></div><div> mapserver-users mailing list<br></div><div> <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br></div><div> <a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div></blockquote></div><div>_______________________________________________<br></div><div>mapserver-users mailing list<br></div><div><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br></div><div><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div></blockquote><div><br></div></body></html>