Bug 1018633
| Summary: | Connection leak in production system | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] Zanata | Reporter: | Ding-Yi Chen <dchen> | ||||
| Component: | Component-Logic | Assignee: | Sean Flanigan <sflaniga> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Zanata-QA Mailling List <zanata-qa> | ||||
| Severity: | urgent | Docs Contact: | |||||
| Priority: | urgent | ||||||
| Version: | 3.0 | CC: | camunoz, ccheng, sflaniga, zanata-bugs | ||||
| Target Milestone: | --- | ||||||
| Target Release: | 3.1 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | 3.1.1-SNAPSHOT (20131017-1642) | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | 959115 | Environment: | |||||
| Last Closed: | 2013-11-27 03:23:58 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Comment 2
Sean Flanigan
2013-10-14 02:00:42 UTC
Correction, the affected version is: Zanata version 3.0.3 (20130919-2218) Correction, the https://zanata.example.com/admin/monitoring?part=graph&graph=usedConnections&period=semaine still works. Steps to get to the monitoring graph: 1. Log in with admin role. 2. Go to Administration menu. 3. Click server monitoring 4. Click the diagram "Used JDBC connection" Simultaneously launching two instances of the same editor (same language) from a project with many documents seems to be fairly reliable at reproducing the exception, as long as the relevant documents/statistics haven't been cached already. (You can use JavaMelody to clear all data caches.) 07:07:12,839 INFO [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (http-/0.0.0.0:8080-7) IJ000311: Throwable from unregister connection: java.lang.IllegalStateException: Trying to return an unknown connection2! org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6@b0da531 Every time that exception is logged, another connection is leaked (or already was), although the cause is probably a little earlier, possibly in a different thread. Pull request: https://github.com/zanata/zanata-server/pull/229 VERIFIED Zanata version 3.1.1-SNAPSHOT (20131017-1642) *** Bug 1020585 has been marked as a duplicate of this bug. *** Created attachment 815210 [details]
When the connections were created (according to JavaMelody)
False alarm (I think). It appears that the connections are being retained deliberately by the DataSource, not leaked, because there are no warning messages in the log such as "Trying to return an unknown connection2!". Also, several of the connections were created at the same time, which may suggest that they were created to expand a connection pool (unless they *all* happened to leak at the same time). Looking at the stack traces, I can't find any suspicous code (eg ResultSet handling) that would explain such a leak. Unless we actually run out of connections (or get the above warning message again), I think we'll have to assume it's behaving normally. I think it's just normal DataSource connection pool behaviour. However, if we get the above log warning, or a server failure like "javax.resource.ResourceException: IJ000655: No managed connections available within configured blocking timeout" or "javax.resource.ResourceException: IJ000453: Unable to get managed connection for ..." we should create a new bug. Closing VERIFIED bugs for Zanata versions <= 3.1. Closing VERIFIED bugs for Zanata versions <= 3.1. Closing VERIFIED bugs for Zanata versions <= 3.1. Closing VERIFIED bugs for Zanata versions <= 3.1. Closing VERIFIED bugs for Zanata versions <= 3.1. Closing VERIFIED bugs for Zanata versions <= 3.1. |