Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0023818 | Openbravo ERP | A. Platform | public | 2013-05-14 14:01 | 2013-05-30 17:14 | |||||||
Reporter | shuehner | |||||||||||
Assigned To | alostale | |||||||||||
Priority | urgent | Severity | major | Reproducibility | have not tried | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | 3.0MP24 | Fixed in Version | 3.0MP24 | |||||||||
Merge Request Status | ||||||||||||
Review Assigned To | AugustoMauch | |||||||||||
OBNetwork customer | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | Production - Confirmed Stable | |||||||||||
Regression date | 2009-10-30 | |||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | https://code.openbravo.com/erp/stable/2.50/rev/30a3de89fd2a [^] | |||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0023818: Background scheduler takes 10 connections to database and never releases those | |||||||||||
Description | The background scheduler is starting 10 threads by default and each of those is keeping open one db-connection all the time without releasing it ever. That way 10 connections more then necessary are kept open to the database leading to increases memory consumption for the system. Technically this is a regression introduced in the AuditTrail project sometime during the 2.50 cycle. | |||||||||||
Steps To Reproduce | Start with normal pi with the background processes scheduled. Apply debugging patch attached to this issue (it will show stack of code forcing the classic connection pool to increase its size) start tomcat Monitor number of connection to the database done by this tomcat. Observe the number increasing over the first around 10min after tomcat start. Using the debugging patch from above observe that those 10 extra connections are created by code running the quartz triggerFired callback, For testing try the 2nd prototype patch attached to this issue which is disabling an optimization added to the AuditTrail project. That optimization disabled closeConnection doing anything relying on some ThreadHandler to close the connection really on http-request-termination. However that code will never close the connection for the quartz case. That 2nd patch just kills that optimization to show the end-result which can be gained. That 2nd patch is NOT intended to be applied anywhere outside of testing. It just demonstrates the goal of the fix. | |||||||||||
Proposed Solution | Improve that SessionInfo class to exclude the quartz threads from the ThreadLocal tracking the session request. | |||||||||||
Additional Information | ||||||||||||
Tags | Performance | |||||||||||
Relationships |
| |||||||||||
Attached Files | log_connection_creator_for_classic_pool.diff (984) 2013-05-14 14:02 https://issues.openbravo.com/file_download.php?file_id=6131&type=bug 2nd_prototype.diff (551) 2013-05-14 14:02 https://issues.openbravo.com/file_download.php?file_id=6132&type=bug | |||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2013-05-14 14:01 | shuehner | New Issue | ||||||||||
2013-05-14 14:01 | shuehner | Assigned To | => AugustoMauch | |||||||||
2013-05-14 14:01 | shuehner | Modules | => Core | |||||||||
2013-05-14 14:01 | shuehner | Triggers an Emergency Pack | => No | |||||||||
2013-05-14 14:02 | shuehner | File Added: log_connection_creator_for_classic_pool.diff | ||||||||||
2013-05-14 14:02 | shuehner | File Added: 2nd_prototype.diff | ||||||||||
2013-05-14 14:07 | shuehner | Regression level | => Production - Confirmed Stable | |||||||||
2013-05-14 14:07 | shuehner | Regression date | => 2009-10-30 | |||||||||
2013-05-14 14:07 | shuehner | Regression introduced by commit | => https://code.openbravo.com/erp/stable/2.50/rev/30a3de89fd2a [^] | |||||||||
2013-05-14 16:34 | alostale | Assigned To | AugustoMauch => alostale | |||||||||
2013-05-15 10:09 | egoitz | Issue Monitored: egoitz | ||||||||||
2013-05-22 11:14 | alostale | Note Added: 0058743 | ||||||||||
2013-05-22 11:15 | alostale | Review Assigned To | => AugustoMauch | |||||||||
2013-05-22 11:27 | hgbot | Checkin | ||||||||||
2013-05-22 11:27 | hgbot | Note Added: 0058745 | ||||||||||
2013-05-22 11:27 | hgbot | Status | new => resolved | |||||||||
2013-05-22 11:27 | hgbot | Resolution | open => fixed | |||||||||
2013-05-22 11:27 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/329f2507a53f189e8c6f035917df45cb695079c3 [^] | |||||||||
2013-05-22 11:43 | alostale | Relationship added | related to 0023882 | |||||||||
2013-05-23 01:34 | hudsonbot | Checkin | ||||||||||
2013-05-23 01:34 | hudsonbot | Note Added: 0058850 | ||||||||||
2013-05-24 15:02 | alostale | Tag Attached: Performance | ||||||||||
2013-05-30 17:13 | AugustoMauch | Note Added: 0059078 | ||||||||||
2013-05-30 17:13 | AugustoMauch | Status | resolved => closed | |||||||||
2013-05-30 17:14 | AugustoMauch | Fixed in Version | => 3.0MP24 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|