Openbravo Issue Tracking System - Openbravo ERP | |||||||||||||||||||
View Issue Details | |||||||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||||||
0036274 | Openbravo ERP | A. Platform | public | 2017-06-19 15:04 | 2017-06-23 11:04 | ||||||||||||||
Reporter | alostale | ||||||||||||||||||
Assigned To | alostale | ||||||||||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||||||||||||
Status | closed | Resolution | fixed | ||||||||||||||||
Platform | OS | 5 | OS Version | ||||||||||||||||
Product Version | |||||||||||||||||||
Target Version | Fixed in Version | 3.0PR17Q3 | |||||||||||||||||
Merge Request Status | |||||||||||||||||||
Review Assigned To | caristu | ||||||||||||||||||
OBNetwork customer | |||||||||||||||||||
Web browser | |||||||||||||||||||
Modules | Core | ||||||||||||||||||
Support ticket | |||||||||||||||||||
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) | ||||||||||||||||||
Proposed Solution | |||||||||||||||||||
Additional Information | |||||||||||||||||||
Tags | Performance | ||||||||||||||||||
Relationships |
| ||||||||||||||||||
Attached Files | |||||||||||||||||||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|