[MapServer-users] mapserver + fcgiwrap + nginx = not work as FastCGI
Rahkonen Jukka
jukka.rahkonen at maanmittauslaitos.fi
Tue Sep 17 06:17:52 PDT 2024
Hi,
I have no personal experience, but I have been reading somewhere that spawn-fcgi might be better, but harder to configure than fcgiwrap.
-Jukka Rahkonen-
Lähettäjä: MapServer-users <mapserver-users-bounces at lists.osgeo.org> Puolesta ????? ??????? via MapServer-users
Lähetetty: tiistai 17. syyskuuta 2024 15.36
Vastaanottaja: MapServer-users at lists.osgeo.org
Aihe: [MapServer-users] mapserver + fcgiwrap + nginx = not work as FastCGI
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/8e3a55db/attachment.htm>
More information about the MapServer-users
mailing list