[MapServer-users] mapserver + fcgiwrap + nginx = not work as FastCGI

Сухно Николай nikolay.su at outlook.com
Tue Sep 17 05:36:15 PDT 2024


Good day to all!

Testing  mapserver under nginx and Linux.

Mapserver launched as a process via fcgiwrap terminates after the first response and does not stay in memory as in Apache mod_fcgid.

After some research I found out that the reason is in the FCGI_Accept function which should wait for a connection but it returns -1 when it is run the second time.

  while( !finish_process && FCGI_Accept() >= 0 ) {   <-- first time FCGI_Accept() return 0. Next run always -1
--------
  int a=-2;
  while( !finish_process && FCGI_Accept() >= 0 ) { <-- first time FCGI_Accept() return 0.
    a = FCGI_Accept();
    msDebug("==FCGI_Accept on start== %d\n", a);  <-- first time FCGI_Accept() return -1.

I understand that this is most likely not a mapserver problem. Most likely the problem is on the fcgiwrap service side. But maybe someone has experience running a mapserver under nginx in FastCGI mode?

MapServer version 8.0.1 PROJ version 8.2 GDAL version 3.9 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER SUPPORTS=OGCAPI_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF
CentOS Stream release 9
nginx version: nginx/1.20.1
fcgiwrap version 1.1.0

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20240917/35a51aeb/attachment.htm>


More information about the MapServer-users mailing list