Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020146Openbravo ERPA. Platformpublic2012-03-29 10:552012-04-13 09:30
alostale 
alostale 
immediatemajorhave not tried
closedfixed 
5
 
3.0MP103.0MP10 
Core
No
0020146: AlertActionHandler PreparedStatement is not closed
Prepared statements used to query the number of active alerts are never closed.

This affects application performance, specially in oracle, because cursors are not closed and memory usage is constantly increasing making the application to degrade over time.

This issue was introduced by fix for 0019985
Using an Oracle env:
 -To faster simulate this degradation, change in ob-alert-manager.js delay from 50000 ms to 500 ms
 -Log in the application and add Admin user as recipient of all alert rules
 -Open 6 concurrent sessions with Admin user
 -Check:
   *The number of open cursors rapidly increases (perform this query with DBA rights) :
      SELECT SID, sql_text, COUNT(*)
      FROM v$open_cursor
      GROUP BY SID, sql_text
      ORDER BY COUNT(*) DESC
   *After some time (~10min) java heap memory consumption is high and it is not collected by garbage collector (see attached screensot showing big consumption of org.hibernate.connection.DriverManagerConnectionProvider because of this fact)

  
Performance, Regression QA
related to defect 00199853.0MP10 closed alostale AlertActionHandler response is unnecessary big 
related to defect 00202613.0MP11 closed alostale SessionInfo PreparedStatement is not closed 
png Selection_046.png (28,191) 2012-03-29 10:57
https://issues.openbravo.com/file_download.php?file_id=5103&type=bug
png
Issue History
2012-03-29 10:55alostaleNew Issue
2012-03-29 10:55alostaleAssigned To => alostale
2012-03-29 10:55alostaleModules => Core
2012-03-29 10:57alostaleFile Added: Selection_046.png
2012-03-29 10:57alostaleTag Attached: Regression QA
2012-03-29 10:58alostaleRelationship addedrelated to 0019985
2012-03-29 11:12alostaleNote Added: 0046865
2012-03-29 11:19alostaleSummaryAlertActionHandler preparedStatement is not closed => AlertActionHandler PreparedStatement is not closed
2012-03-29 11:19hgbotCheckin
2012-03-29 11:19hgbotNote Added: 0046867
2012-03-29 11:19hgbotStatusnew => resolved
2012-03-29 11:19hgbotResolutionopen => fixed
2012-03-29 11:19hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a844ff835130b17bf2df8624b76b634d7b261c8c [^]
2012-03-30 15:27marvintmStatusresolved => closed
2012-03-30 15:27marvintmFixed in Version => 3.0MP10
2012-04-02 06:12hudsonbotCheckin
2012-04-02 06:12hudsonbotNote Added: 0047264
2012-04-13 09:29alostaleRelationship addedblocks 0020261
2012-04-13 09:29alostaleRelationship replacedrelated to 0020261
2012-04-13 09:30alostaleTag Attached: Performance

Notes
(0046865)
alostale   
2012-03-29 11:12   
This fix is not risky.

Test plan: execute steps to reproduce and verify it is working fine now.
(0046867)
hgbot   
2012-03-29 11:19   
Repository: erp/devel/pi
Changeset: a844ff835130b17bf2df8624b76b634d7b261c8c
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Mar 29 11:19:23 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a844ff835130b17bf2df8624b76b634d7b261c8c [^]

fixed bug 20146: AlertActionHandler PreparedStatement is not closed

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java
---
(0047264)
hudsonbot   
2012-04-02 06:12   
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/7814864461ac [^]

Maturity status: Test