[Mapserver-users] Spatial Database Connections

Paul Ramsey pramsey at refractions.net
Fri Dec 13 00:12:07 EST 2002


You are absolutely correct in your understanding. 
Yes, this probably is a performance bottleneck. The amount of connection
induced latency will scale up with the number of db-sourced layers.
Jan Hartmann posted a reasonable strategy to reduce the number of open
connections to the number of unique databases being accessed. I do not
know if he was planning on implementing it himself.
Paul

Benjamin Wragg wrote:

> Last month there was a discussion on this list regarding database
> connections to SDE/Oracle Spatial and PostGIS. From what I could
> understand, MapServer creates a database connection for each layer. So
> if I have a map file with ten layers from a PostGIS database, and a user
> requests the map file, 10 database connections would be created and once
> the data is retrieved MapServer would terminate the connections. Then if
> the user zoomed in on the map MapServer would create another 10
> connections, retrieve the data and terminate the connections. If at the
> same time another user accesses the same map file, a second lot of 10
> database connections would be created.
> 
> If I?m correct in my understanding of the way it works, is there any
> performance problems with opening so many database connections?
> 
> Thanks,
> 
> Benjamin Wragg



More information about the mapserver-users mailing list