Hi all,
I submitted a pull request regarding the connection pool configuration.
https://github.com/geotools/geotools/pull/501
The pull request is quite small and simple, only the class
JDBCDataStoreFactory.java class is involved.
Motivations of the pull request:
We have experienced some trouble in several production geoserver
installations that make the geoserver datastores connected to a DBMS
unavailable usually for 10-15 minutes.
We discovered that this happens when in the middle of geoserver and the
database there is a firewall (or something similar) configured to delete
idle tcp connections.
If a pool underlying TCP connection is deleted the validation query can
take several minutes to be executed and it basically blocks all requests to
the layers.
Proposed fix:
As has been discussed in the past, the usage of apache commons DBCP2 can
best address this kind of problems but its migration can be tricky. In the
meanwhile the patch I submitted allows to perform further configurations
in order to solve this kind of issues.
These are the new parameters introduced in this pull request:
TEST_WHILE_IDLE = If IDLE connections should be validated before using them
TIME_BETWEEN_EVICTOR_RUNS = Idle object evictor periodicity
MIN_EVICTABLE_TIME = Min time for a connection to be idle in order to be
evicted
EVICTOR_TESTS_PER_RUN = Number of connections checked during a single
evictor run
Playing a bit with these 4 parameters has successfully solved the idle
connection issue in 3 our different geoserver installations.
Looking forward for your opinion, I'm available for further explanations
Best regards,
Damiano
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.
==
Dott. Damiano Giampaoli
Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel