Bug 1009640 - JDBC connections leaked during baseline calculations
JDBC connections leaked during baseline calculations
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core Server (Show other bugs)
4.9
Unspecified Unspecified
unspecified Severity urgent (vote)
: ER02
: RHQ 4.10
Assigned To: John Sanda
Mike Foley
:
Depends On:
Blocks: jon32-Beta-Blockers-1006862
  Show dependency treegraph
 
Reported: 2013-09-18 15:00 EDT by John Sanda
Modified: 2014-04-29 10:43 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-04-23 08:31:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Sanda 2013-09-18 15:00:40 EDT
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 15:32:21 EDT
I committed the fix to master.

commit hash: 7776a638
Comment 2 Simeon Pinder 2013-10-08 03:48:44 EDT
Moving to ON_QA for testing.
Comment 3 Selim Ok 2013-11-08 09:52:27 EST
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 10:50:22 EST
@Selim this should be in next release of product and community.
Comment 5 Selim Ok 2013-11-15 11:47:01 EST
@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 05:26:00 EST
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 08:31:12 EDT
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.