Opened 12 years ago
Closed 12 years ago
#1106 closed defect (fixed)
GeoNetwork servlet hangs due to using up database connections: JNDI, Oracle and maxWritesInTransaction = 1
Reported by: | simonp | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | v2.8.0 RC2 |
Component: | General | Version: | v2.8.0RC1 |
Keywords: | Cc: |
Description
JNDI database connection pool Oracle 11g (11.2.0.2) GeoNetwork maxWritesInTransaction set to 1 (WEB-INF/config.xml)
maxWritesInTransaction=1 causes auto commit mode to be used by spatial index writer (which uses GeoTools)
But database connections don't seem to be closed/released - eventually this causes services to hang waiting for a connection to become free (after all available connections are used). This can be shown by reindexing a larger catalog - hangs after some number of records reindexed. Restart server with more connections in the pool, try reindexing and reindexing gets a bit further before hang due to the fact that more connections are available.
Will try with other databases to check whether it is an oracle thing or not. So far this happens regardless of the ojdbc version, jdk6 or jdk7, apache tomcat 6 or 7. Might try different apache dbcp version.
This is an important bug as without maxWritesInTransaction=1 spatial database connections are vulnerable to connection dropping eg. when database is shut down for maintenance. Problem is that it could be (and very likely) is in geotools.
Attachments (1)
Change History (6)
comment:1 by , 12 years ago
by , 12 years ago
Attachment: | geotools-8.2.patch added |
---|
comment:2 by , 12 years ago
Actually - just had a look at this again and it doesn't seem that tricky to upgrade to geotools 8.2 - patch attached for review.
comment:3 by , 12 years ago
I did an upgrade to 8.1 (although it should only be a matter of changing 1 line of a pom to 8.2)
Is the patch for 2.6.x?
comment:4 by , 12 years ago
The patch I did was for 2.8.x but presumably this is also needed for 2.6.x as well so needs to be backported.
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Tried different apache dbcp and pooling (later versions) - no difference
Seems that upgrading to geotools 8.2 does fix it though! So the problem does appear to be in geotools 2.7.x (note geotools 2.7.5 also has the problem).
I hacked the upgrade to geotools 8.2 in a quick and dirty fashion to test out whether this would make a difference - I understand Jesse has a proper upgrade to 8.2 ready? If so then I think we should commit this to 2.8.0 so that it can get into RC2 as this is a critical fix here and most definitely for other sites that use a spatial database for index.