Bug 1009640 - JDBC connections leaked during baseline calculations
Summary: JDBC connections leaked during baseline calculations
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core Server
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ER02
: RHQ 4.10
Assignee: John Sanda
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: jon32-Beta-Blockers-1006862
TreeView+ depends on / blocked
 
Reported: 2013-09-18 19:00 UTC by John Sanda
Modified: 2014-04-29 14:43 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-23 12:31:12 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1010976 0 urgent CLOSED After 2 days of being UP, JON server runs out of database connections 2021-02-22 00:41:40 UTC

Internal Links: 1010976

Description John Sanda 2013-09-18 19:00:40 UTC
Description of problem:
There is query to determine which schedules do not have baselines. This is executed as a native, SQL query. The method MeasurementBaselineManagerBean.getSchedulesWithoutBaselines() obtains a JDBC connection to execute the query but fails to close it. I saw the following errors in my server.log after it was running for a few days.

12:38:29,277 WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.PoolBySubject] (EJB default - 1) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection
        at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:458)
        at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:395)
        at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:782)
.
.
.
Caused by: org.postgresql.util.PSQLException: FATAL: connection limit exceeded for non-superusers
        at org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:572)
        at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:177)
        at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64)
        at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:136)
        at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:29)
        at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:21)
        at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:31)
        at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
        at org.postgresql.Driver.makeConnection(Driver.java:393)
        at org.postgresql.Driver.connect(Driver.java:267)
        at java.sql.DriverManager.getConnection(DriverManager.java:620) [rt.jar:1.6.0_24]
        at java.sql.DriverManager.getConnection(DriverManager.java:200) [rt.jar:1.6.0_24]
        at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:95)
        at org.postgresql.xa.jdbc3.AbstractJdbc3XADataSource.getXAConnection(AbstractJdbc3XADataSource.java:54)
        at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:441)
        ... 284 more


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 John Sanda 2013-09-18 19:32:21 UTC
I committed the fix to master.

commit hash: 7776a638

Comment 2 Simeon Pinder 2013-10-08 07:48:44 UTC
Moving to ON_QA for testing.

Comment 3 Selim Ok 2013-11-08 14:52:27 UTC
Is it possible to make an assumption about the date of the next release, which will come with this bug fix?

Comment 4 Simeon Pinder 2013-11-14 15:50:22 UTC
@Selim this should be in next release of product and community.

Comment 5 Selim Ok 2013-11-15 16:47:01 UTC
@Simeon: Actually i would like to know the release date of the next release. We wait this fix urgently, becaus our RHQ instance became inaccessible every two days and we have to restart it each time.

Comment 6 peer.bech.hansen 2014-01-27 10:26:00 UTC
Do we have an ETA for RHQ 4.10.0, or would we be able to patch 4.9.0 in order to fix  this problem?

Comment 7 Heiko W. Rupp 2014-04-23 12:31:12 UTC
Bulk closing of 4.10 issues.

If an issue is not solved for you, please open a new BZ (or clone the existing one) with a version designator of 4.10.


Note You need to log in before you can comment on or make changes to this bug.