[mapserver-users] fast cgi MapServer (version 6.0.3) vs cgi with awms getmap request

Eichner, Andreas - SID-NLKM Andreas.Eichner at sid.sachsen.de
Fri Nov 9 02:16:02 PST 2012


Hello Thomas,

> In FastCGI mode, a connection will be kept open during the 
> lifecycle of the fastcgi process, i.e. the connection will 
> not be closed at the end of a request.

Damn, you're right. Had a look at the code and tracking down the
chain I saw:

  mapserv.c: msFreeMapServObj()
  maptemplate.c: msFreeMap()
  mapobject.c: msCloseConnections()
  mapfile.c: vtable->LayerCloseConnection() [for each layer]

But PostGIS layers don't provide a LayerCloseConnection() and use the
pooling API instead - and that is the magic that keeps the connection.
Sorry for the confusion.

> It should be noted that these limitations would also apply to a 
> homemade mapscript script that reuses a mapObj for multiple requests.

I overcame that problem by using msCopyMap(). It's not that elegant than

using separate datastructure for service config and work data but still
avoids the costly invocation of the parser.


Regards


More information about the mapserver-users mailing list