Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0036274 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2017-06-19 15:04 | 2017-06-23 11:04 | |||
Reporter | alostale | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR17Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | cfd3f8102b4a | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | caristu | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0036274: abandoned connection in SessionListener | |||||||
Description | Two cases: 1. When a session is expired due to Tomcat's session timeout by SessionListener, the DB connection used in this thread is never returned to pool. Note this occurs in case the actual thread invalidating the session is ContainerBackgroundProcessor. If it is invalidated through SessionExpirationFilter, the connection is correctly returned to pool. Latter case occurs ie. alert ping happens. 2. When Tomcat is shut down having active sessions. | |||||||
Steps To Reproduce | 1.1. Configure pool to log abandoned connections 1.2. Log in Openbravo 1.3. Close browser used to login (to prevent alert ping to invalidate session) 1.4. Wait until session expires due to time out -> check log: Jun 19, 2017 2:55:42 PM org.apache.tomcat.jdbc.pool.ConnectionPool suspect WARNING: Connection has been marked suspect, possibly abandoned PooledConnection[org.postgresql.jdbc.PgConnection@4b3fb2fb][10482 ms.]:java.lang.Exception at org.apache.tomcat.jdbc.pool.ConnectionPool.getThreadDump(ConnectionPool.java:1096) at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:799) at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:648) at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:200) at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:128) at org.openbravo.apachejdbcconnectionpool.JdbcExternalConnectionPool.getConnectionFromDS(JdbcExternalConnectionPool.java:130) at org.openbravo.apachejdbcconnectionpool.JdbcExternalConnectionPool.getConnection(JdbcExternalConnectionPool.java:93) at org.openbravo.database.ConnectionProviderImpl.getNewConnection(ConnectionProviderImpl.java:260) at org.openbravo.database.ConnectionProviderImpl.getConnection(ConnectionProviderImpl.java:236) at org.openbravo.database.ConnectionProviderImpl.getPreparedStatement(ConnectionProviderImpl.java:369) at org.openbravo.database.ConnectionProviderImpl.getPreparedStatement(ConnectionProviderImpl.java:361) at org.openbravo.erpCommon.security.SessionLoginData.deactivate(SessionLoginData.java:81) at org.openbravo.erpCommon.security.SessionListener.deactivateSession(SessionListener.java:195) at org.openbravo.erpCommon.security.SessionListener.sessionDestroyed(SessionListener.java:65) --- 2.1 Configure pool to log abandoned connections 2.2 Log in Openbravo 2.3 Stop tomcat -> check log: Jun 19, 2017 3:04:24 PM org.apache.tomcat.jdbc.pool.ConnectionPool abandon WARNING: Connection has been abandoned PooledConnection[org.postgresql.jdbc.PgConnection@744cf1bd]:java.lang.Exception at org.apache.tomcat.jdbc.pool.ConnectionPool.getThreadDump(ConnectionPool.java:1096) at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:799) at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:648) at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:200) at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:128) at org.openbravo.apachejdbcconnectionpool.JdbcExternalConnectionPool.getConnectionFromDS(JdbcExternalConnectionPool.java:130) at org.openbravo.apachejdbcconnectionpool.JdbcExternalConnectionPool.getConnection(JdbcExternalConnectionPool.java:93) at org.openbravo.database.ConnectionProviderImpl.getNewConnection(ConnectionProviderImpl.java:260) at org.openbravo.database.ConnectionProviderImpl.getConnection(ConnectionProviderImpl.java:236) at org.openbravo.database.ConnectionProviderImpl.getPreparedStatement(ConnectionProviderImpl.java:369) at org.openbravo.database.ConnectionProviderImpl.getPreparedStatement(ConnectionProviderImpl.java:361) at org.openbravo.erpCommon.security.SessionLoginData.deactivate(SessionLoginData.java:81) | |||||||
Tags | Performance | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||
|
Notes | |
(0097478) hgbot (developer) 2017-06-19 15:17 |
Repository: erp/devel/pi Changeset: cfd3f8102b4a1b9b3382a70128459cd258835ffa Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Mon Jun 19 15:16:26 2017 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/cfd3f8102b4a1b9b3382a70128459cd258835ffa [^] fixed bug 36274: abandoned connection in SessionListener Detach connection from current thread to allow it to be properly returned to pool. This is required whever the thread doing the actio is not handling an standard request. --- M src/org/openbravo/erpCommon/security/SessionListener.java --- |
(0097518) hudsonbot (developer) 2017-06-20 16:31 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/8518c867b17c [^] Maturity status: Test |
(0097602) caristu (developer) 2017-06-23 11:04 |
Code reviewed |
Issue History | |||
Date Modified | Username | Field | Change |
2017-06-19 15:04 | alostale | New Issue | |
2017-06-19 15:04 | alostale | Assigned To | => alostale |
2017-06-19 15:04 | alostale | Modules | => Core |
2017-06-19 15:04 | alostale | Triggers an Emergency Pack | => No |
2017-06-19 15:04 | alostale | Tag Attached: Performance | |
2017-06-19 15:07 | alostale | Relationship added | has duplicate 0023882 |
2017-06-19 15:10 | alostale | Relationship added | related to 0036261 |
2017-06-19 15:17 | hgbot | Checkin | |
2017-06-19 15:17 | hgbot | Note Added: 0097478 | |
2017-06-19 15:17 | hgbot | Status | new => resolved |
2017-06-19 15:17 | hgbot | Resolution | open => fixed |
2017-06-19 15:17 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/cfd3f8102b4a1b9b3382a70128459cd258835ffa [^] |
2017-06-20 09:23 | alostale | Review Assigned To | => caristu |
2017-06-20 16:31 | hudsonbot | Checkin | |
2017-06-20 16:31 | hudsonbot | Note Added: 0097518 | |
2017-06-23 11:04 | caristu | Note Added: 0097602 | |
2017-06-23 11:04 | caristu | Status | resolved => closed |
2017-06-23 11:04 | caristu | Fixed in Version | => 3.0PR17Q3 |
Copyright © 2000 - 2009 MantisBT Group |