Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032576Openbravo ERPA. Platformpublic2016-04-04 11:362017-08-23 08:41
alostale 
alostale 
urgentmajorhave not tried
closedfixed 
5
 
3.0PR16Q3 
caristu
Core
No
0032576: connection leak when printing Requisition report
Whenever Requisition report is printed a DB connection is got from pool and never released.
0. In DB (PG) execute: select * from pg_stat_activity where state = 'idle in transaction'
  -> Check there are no rows
1. Open Requisition window
2. Create a Requisition with at least one line
3. Print the Requisition by clicking the "Printer" icon in the toolbar
4. Execute again select * from pg_stat_activity where state = 'idle in transaction'
  -> Check there is one row

Each time step 3 is repeated, a new row will appear in the query. This means a new connection is set as idle in transaction state, these transactions are never closed.
Performance
related to design defect 0030182 closed Triage Platform Base jasper subreports using DAL do leak connection + transactions 
related to feature request 0034816 closed caristu Support a second database for reporting 
related to defect 0035193 closed caristu Error fired when trying to print and attach a document 
related to defect 0035356 closed caristu print & attach doc logs error using (old) commons jdbc pool 
related to defect 0036697 closed caristu connection leak when printing a image on a jasper subreport using the Utility.showImage method 
related to defect 0048465 closed caristu Some process definition reports stop working after upgrading from 18Q3 to 21Q2.3 
Issue History
2016-04-04 11:36alostaleNew Issue
2016-04-04 11:36alostaleAssigned To => platform
2016-04-04 11:36alostaleModules => Core
2016-04-04 11:36alostaleTriggers an Emergency Pack => No
2016-04-04 11:37alostaleRelationship addedrelated to 0030182
2016-04-04 11:37alostaleStatusnew => scheduled
2016-04-04 11:37alostaleAssigned Toplatform => alostale
2016-04-04 11:37alostaleReview Assigned To => caristu
2016-04-04 11:53hgbotCheckin
2016-04-04 11:53hgbotNote Added: 0085406
2016-04-04 11:53hgbotStatusscheduled => resolved
2016-04-04 11:53hgbotResolutionopen => fixed
2016-04-04 11:53hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/69d33f65c988d16d5f1864893c9030f0629e491b [^]
2016-04-04 12:31alostaleTag Attached: Performance
2016-04-04 12:43caristuNote Added: 0085413
2016-04-04 12:43caristuStatusresolved => closed
2016-04-04 12:43caristuFixed in Version => 3.0PR16Q3
2016-04-04 12:43caristuNote Edited: 0085413bug_revision_view_page.php?bugnote_id=0085413#r11639
2016-06-17 19:36hudsonbotCheckin
2016-06-17 19:36hudsonbotNote Added: 0087413
2017-02-08 09:40caristuRelationship addedrelated to 0035193
2017-02-24 15:21caristuRelationship addedrelated to 0035356
2017-02-24 15:25caristuRelationship addedrelated to 0034816
2017-08-23 08:41egoitzIssue cloned0036697
2017-08-23 08:41egoitzRelationship addedrelated to 0036697
2022-02-15 08:01caristuRelationship addedrelated to 0048465

Notes
(0085406)
hgbot   
2016-04-04 11:53   
Repository: erp/devel/pi
Changeset: 69d33f65c988d16d5f1864893c9030f0629e491b
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Apr 04 11:52:47 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/69d33f65c988d16d5f1864893c9030f0629e491b [^]

fixed bug 32576: connection leak when printing Requisition report

  Ensure methods used by Requisition subreports close DAL transaction after using
  it so that the connection is returned back to the pool.

---
M src/org/openbravo/erpCommon/utility/Utility.java
---
(0085413)
caristu   
2016-04-04 12:43   
Code review + testing OK.

- The transactions are now closed: there are not connections set as 'idle in transaction' state after printing the report.

- The report is printed properly.

(0087413)
hudsonbot   
2016-06-17 19:36   
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/0dc7be081b1c [^]
Maturity status: Test