#1106: GeoNetwork servlet hangs due to using up database connections: JNDI, Oracle
and maxWritesInTransaction = 1
---------------------+------------------------------------------------------
Reporter: simonp | Owner: geonetwork-devel@…
Type: defect | Status: new
Priority: blocker | Milestone: v2.8.0 RC2
Component: General | Version: v2.8.0RC1
Keywords: |
---------------------+------------------------------------------------------
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.
--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1106>
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/>
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.
#1106: GeoNetwork servlet hangs due to using up database connections: JNDI, Oracle
and maxWritesInTransaction = 1
---------------------+------------------------------------------------------
Reporter: simonp | Owner: geonetwork-devel@…
Type: defect | Status: new
Priority: blocker | Milestone: v2.8.0 RC2
Component: General | Version: v2.8.0RC1
Keywords: |
---------------------+------------------------------------------------------
Comment(by simonp):
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.
--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1106#comment:1>
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/>
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.
#1106: GeoNetwork servlet hangs due to using up database connections: JNDI, Oracle
and maxWritesInTransaction = 1
---------------------+------------------------------------------------------
Reporter: simonp | Owner: geonetwork-devel@…
Type: defect | Status: new
Priority: blocker | Milestone: v2.8.0 RC2
Component: General | Version: v2.8.0RC1
Keywords: |
---------------------+------------------------------------------------------
Comment(by simonp):
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.
--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1106#comment:2>
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/>
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.
#1106: GeoNetwork servlet hangs due to using up database connections: JNDI, Oracle
and maxWritesInTransaction = 1
---------------------+------------------------------------------------------
Reporter: simonp | Owner: geonetwork-devel@…
Type: defect | Status: new
Priority: blocker | Milestone: v2.8.0 RC2
Component: General | Version: v2.8.0RC1
Keywords: |
---------------------+------------------------------------------------------
Comment(by jeichar):
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?
--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1106#comment:3>
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/>
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.
#1106: GeoNetwork servlet hangs due to using up database connections: JNDI, Oracle
and maxWritesInTransaction = 1
---------------------+------------------------------------------------------
Reporter: simonp | Owner: geonetwork-devel@…
Type: defect | Status: new
Priority: blocker | Milestone: v2.8.0 RC2
Component: General | Version: v2.8.0RC1
Keywords: |
---------------------+------------------------------------------------------
Comment(by simonp):
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.
--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1106#comment:4>
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/>
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.
That looks a great deal like the change I made: cee3f58371865da06e5721ebc060f7b20a5dcd56. Looks good.
Jesse
On Wed, Oct 10, 2012 at 5:30 PM, GeoNetwork opensource Developer website <trac_osgeo@anonymised.com> wrote:
#1106: GeoNetwork servlet hangs due to using up database connections: JNDI, Oracle
and maxWritesInTransaction = 1
---------------------±-----------------------------------------------------
Reporter: simonp | Owner: geonetwork-devel@…
Type: defect | Status: new
Priority: blocker | Milestone: v2.8.0 RC2
Component: General | Version: v2.8.0RC1
Keywords: |
---------------------±-----------------------------------------------------
Comment(by simonp):
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.
–
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1106#comment:4>
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/>
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.
#1106: GeoNetwork servlet hangs due to using up database connections: JNDI, Oracle
and maxWritesInTransaction = 1
----------------------+-----------------------------------------------------
Reporter: simonp | Owner: geonetwork-devel@…
Type: defect | Status: closed
Priority: blocker | Milestone: v2.8.0 RC2
Component: General | Version: v2.8.0RC1
Resolution: fixed | Keywords:
----------------------+-----------------------------------------------------
Changes (by simonp):
* status: new => closed
* resolution: => fixed
Comment:
Fixed in commit https://github.com/geonetwork/core-
geonetwork/commit/3e11a26f0b30f15c18369c39b84c83575b77c674
--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1106#comment:5>
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/>
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.