[mapguide-users] MgFeatureReader.Close() doesnt close postgis
connections
Bruce Dechant
bruce.dechant at autodesk.com
Tue Jul 13 13:10:39 EDT 2010
James,
Closing the reader doesn't close the connection on the server side - this is due to the connection pooling.
If you want to ensure that it does get closed you could add the postgis provider to the list of excluded providers. Doing so will have a negative impact on performance though. The server will automatically release the connection after a period of inactivity (Another serverconfig.ini setting. ie: DataConnectionTimeout).
The excluded provider setting is in the serverconfig.ini file:
[FeatureServiceProperties]
DataConnectionPoolExcludedProviders = OSGeo.PostGIS
The change will take effect when you restart the server.
Thanks,
Bruce
________________________________________
From: mapguide-users-bounces at lists.osgeo.org [mapguide-users-bounces at lists.osgeo.org] On Behalf Of doggybs [james.slater at keynetix.com]
Sent: Tuesday, July 13, 2010 10:59 AM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] MgFeatureReader.Close() doesnt close postgis connections
Hi All
I am using the following code in the Mapguide API to return a
MgFeatureReader to my postgis data source.
featureService.SelectFeatures(featureSourceId, classId.QualifiedClassName,
queryOptions);
I am using Mapguide2011 with FDO 3.5
When this command is executed I can see from postgis that a new connection
is opened. Running the following query in postgres show me the open
connections :
select * from pg_stat_activity;
Once i have finished. I call MgFeatureReader.Close(), but the connection to
postgis do not reduce?
Is this possible something to do with Connection Pooling? or is there a
problem with my code, or Close function.
Many Thanks
James
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/MgFeatureReader-Close-doesnt-close-postgis-connections-tp5288437p5288437.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
More information about the mapguide-users
mailing list