[Mapserver-users] Storing database connections in a CGI session

woodbri at swoodbridge.com woodbri at swoodbridge.com
Tue Dec 9 14:46:38 EST 2003


Because Mapserver is a CGI and transient by nature, unless that 
changes in the future you would need to setup a persistent process 
like a proxy that opened the connections and maintained a pool of 
them and then have Mapserver request an already open connection from 
the pool so it can make its queries, then when mapserver exits, the 
connection goes back to the pool for reuse. If the connection time 
between mapserver and the pool proxy is very fast (and I don't see 
why it could be) then you should get a big win if the cost is making 
the connections to start with.

-Steve W.

On 9 Dec 2003 at 11:22, Doug Cates wrote:

> Richard, Bart,
> 
> I'm also VERY interested in this, as I'm hoping to set up a MapServer /
> SDE implementation early in the new year. Can you send me some
> information on your testing too, Richard? 
> 
> As far as ArcIMS goes, I know for sure that it sets up multiple
> connections to SDE for each ArcIMS service when the service is created,
> and keeps them open until the ArcIMS service is shut down. I don't
> believe that there is any caching taking place.
> 
> Is there any chance that something can be built right into MapServer to
> do something similar, opening a connection pool when the first SDE map
> is requested, and re-using the connections if they are present?
> 
> Doug
>  
> 
> On Tue, 2003-12-09 at 10:45, Bart van den Eijnden wrote:
> > Hi Richard,
> > 
> > what is the absolute difference in performance (time) between Mapserver en 
> > ArcIMS? And can you tell some more about how you did the tests (number of 
> > concurrent users, which tool etc.)?
> > 
> > I think the difference is not only in the database connection, but also in 
> > the caching of data. Although I do not know how ArcIMS works exactly 
> > behind the scenes ofcourse.
> > 
> > An alternative to CGI sessions is the fastcgi approach. Frank Warmerdam 
> > did some work on this a few months ago, but I don't know if there any 
> > useable results.
> > 
> > See also:
> > http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?FastCGI
> > 
> > Best regards,
> > Bart
> > 
> > On Tue, 9 Dec 2003 19:29:32 +0100, Richard Holzmeier 
> > <Richard.Holzmeier at epost.de> wrote:
> > 
> > > Currently i am testing MapServers load performance against ArcIMS using 
> > > SDE
> > > and OracleSpatial database connections. ArcIMS displaces MapServer with a
> > > performance rate up to 7:1, certainly due to the overhead of creating a 
> > > new
> > > session with every request. I´m thinking about using CGI sessions to 
> > > store
> > > opened database sessions for a while using a library such as CGI::SESSION
> > > (http://search.cpan.org/~sherzodr/). Unfortunately i´m fairly new with 
> > > C/C++
> > > and Perl and have no idea of the complexity or possibility to implement
> > > this.
> > >
> > > If anybody has, i will appreciate responses of any kind. Thanks in 
> > > advance,
> > > Richard
> > >
> > >
> > > _______________________________________________
> > > Mapserver-users mailing list
> > > Mapserver-users at lists.gis.umn.edu
> > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> > >
> > 
> > 
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 






More information about the mapserver-users mailing list