Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0036001 | Openbravo ERP | A. Platform | public | 2017-05-15 23:02 | 2017-05-29 17:43 |
|
Reporter | egoitz | |
Assigned To | alostale | |
Priority | immediate | Severity | major | 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 | Pre packaging ( pi ) |
Regression date | 2017-04-27 |
Regression introduced in release | pi |
Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/275afe71cbfd4e1ddd7e1b04671559bd01614af2 [^] |
Triggers an Emergency Pack | No |
|
Summary | 0036001: Connection leak after start the system having any servlet with "loaded-on-startup" for example: Analytics module installed |
Description | A transaction is not closed after restart tomcat when the instance has Analytics module installed.
The problem occurs for any Servlet that is marked to be loaded on startup, at this point a DAL connection is now created out of a Servlet request, so standard DalThreadHandler is not closing it. |
Steps To Reproduce | In an environment with Analytics module installed:
1- Start tomcat
Check on the pg_stat_activity that there is a line in state='idle in transaction'
the query is:
SELECT mo.action AS TYPE, (CASE mo.action WHEN 'X' THEN mo.ad_form_id WHEN 'P' THEN mo.ad_process_id WHEN 'R' THEN mo.ad_process_id WHEN 'S' THEN mo.ad_reference_id WHEN 'C' THEN mo.ad_callout_id ELSE null END) AS ID, m.name AS NAME, /*Name is only maintained for backwards compatibility, now REPORT_TITLE is automatically filled*/ COALESCE((CASE mo.action WHEN 'X' THEN f.ad_module_id WHEN 'P' THEN p.ad_module_id WHEN 'R' THEN p.ad_module_id WHEN 'S' THEN r.ad_module_id W
Having Analytics installed this query is launched in the init method of the QueryRepositoryServlet servlet |
Proposed Solution | Being this query executed on Servlet's init method, which is typically executed just once per class, the overhead of using an extra connection for 1st execution is small. So reverting init part of changeset for 0035855 is safe in this case. |
Additional Information | |
Tags | Performance |
Relationships | related to | defect | 0023882 | | closed | alostale | 2 dangling DB connections after Tomcat start | caused by | defect | 0035855 | | closed | alostale | many standard requests borrow more than one connection from DB |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2017-05-15 23:02 | egoitz | New Issue | |
2017-05-15 23:02 | egoitz | Assigned To | => platform |
2017-05-15 23:02 | egoitz | Modules | => Core |
2017-05-15 23:02 | egoitz | Resolution time | => 1496008800 |
2017-05-15 23:02 | egoitz | Triggers an Emergency Pack | => No |
2017-05-15 23:03 | egoitz | Note Added: 0096612 | |
2017-05-19 08:06 | caristu | Relationship added | related to 0023882 |
2017-05-19 08:35 | alostale | Note Added: 0096666 | |
2017-05-19 08:35 | alostale | Assigned To | platform => egoitz |
2017-05-19 08:35 | alostale | Status | new => feedback |
2017-05-19 08:36 | alostale | Tag Attached: Performance | |
2017-05-19 08:46 | caristu | Relationship added | caused by 0035855 |
2017-05-19 09:04 | caristu | Regression level | => Pre packaging ( pi ) |
2017-05-19 09:04 | caristu | Regression date | => 2017-04-27 |
2017-05-19 09:04 | caristu | Regression introduced in release | => pi |
2017-05-19 09:04 | caristu | Regression introduced by commit | => https://code.openbravo.com/erp/devel/pi/rev/275afe71cbfd4e1ddd7e1b04671559bd01614af2 [^] |
2017-05-19 09:04 | caristu | Status | feedback => new |
2017-05-19 09:04 | caristu | Summary | Connection leak after restart and login to the system => Connection leak after restart and login to the system having Analytics module installed |
2017-05-19 09:04 | caristu | Description Updated | bug_revision_view_page.php?rev_id=15188#r15188 |
2017-05-19 09:04 | caristu | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=15190#r15190 |
2017-05-19 09:05 | caristu | Note Added: 0096669 | |
2017-05-19 13:22 | caristu | Assigned To | egoitz => platform |
2017-05-22 08:35 | alostale | Priority | normal => immediate |
2017-05-22 10:32 | alostale | Summary | Connection leak after restart and login to the system having Analytics module installed => Connection leak after start the system having Analytics module installed |
2017-05-22 10:32 | alostale | Description Updated | bug_revision_view_page.php?rev_id=15191#r15191 |
2017-05-22 10:32 | alostale | Proposed Solution updated | |
2017-05-22 10:54 | alostale | Assigned To | platform => alostale |
2017-05-22 10:54 | alostale | Review Assigned To | => caristu |
2017-05-22 10:55 | hgbot | Checkin | |
2017-05-22 10:55 | hgbot | Note Added: 0096691 | |
2017-05-22 10:55 | hgbot | Status | new => resolved |
2017-05-22 10:55 | hgbot | Resolution | open => fixed |
2017-05-22 10:55 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/ed6475ed00d30181c399db5aeccc3de6e34bb4f4 [^] |
2017-05-22 10:55 | hgbot | Checkin | |
2017-05-22 10:55 | hgbot | Note Added: 0096692 | |
2017-05-25 09:20 | caristu | Note Added: 0096774 | |
2017-05-25 09:20 | caristu | Status | resolved => closed |
2017-05-25 09:20 | caristu | Fixed in Version | => 3.0PR17Q3 |
2017-05-29 12:48 | shuehner | Summary | Connection leak after start the system having Analytics module installed => Connection leak after start the system having any servlet with "loaded-on-startup" for example: Analytics module installed |
2017-05-29 17:43 | hudsonbot | Checkin | |
2017-05-29 17:43 | hudsonbot | Note Added: 0096977 | |
2017-05-29 17:43 | hudsonbot | Checkin | |
2017-05-29 17:43 | hudsonbot | Note Added: 0096978 | |
Notes |
|
(0096612)
|
egoitz
|
2017-05-15 23:03
|
|
The query is located on the following file:
src/org/openbravo/base/secureApp/ClassInfo_data.xsql: |
|
|
|
Not reproducible with the reported steps, please provide more information to reproduce it. |
|
|
|
It seems that it can be reproduced always when the Analytics module is present.
Steps to reproduce updated. |
|
|
(0096691)
|
hgbot
|
2017-05-22 10:55
|
|
Repository: erp/devel/pi
Changeset: ed6475ed00d30181c399db5aeccc3de6e34bb4f4
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon May 22 10:47:17 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ed6475ed00d30181c399db5aeccc3de6e34bb4f4 [^]
fixed bug 36001: leaked db connection after start the system having Analytics
A DB transaction is kept open in 'idle in transaction' state forever afeter
Tomcat start in case there are any servlet that is loaded on startup.
---
M src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
---
|
|
|
(0096692)
|
hgbot
|
2017-05-22 10:55
|
|
Repository: erp/devel/pi
Changeset: fcdc5e67ecce0650b883d667cb0463f5834b217e
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon May 22 10:53:27 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/fcdc5e67ecce0650b883d667cb0463f5834b217e [^]
related to bug 36001: HSAS.init log cleanup
* Removed unneeded log for host info
* Rephrased mehtod invokation message
* Add context in case of error
* Show stack traces in case of error
---
M src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
---
|
|
|
|
Code reviewed + testing OK. |
|
|
|
|
|
|
|