Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038614Openbravo ERPA. Platformpublic2018-05-24 11:162018-05-25 09:13
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
3.0PR18Q3 
alostale
Core
No
0038614: HeartbeatProcess can lead to database connection leaks under some circumstances
HeartbeatProcess can lead to database connection leaks if when executing the process it happens one of the following:

a) The heartbeat is not yet active
b) Internet is not available
0) Log-in in an Openbravo instance with the heartbeat not active.
1) Schedule the HeartbeatProcess to be executed every minute
2) Wait a couple of minutes
3) In the database, launch:

select count(*) from pg_stat_activity where state ilike '%in transaction%'

The query will return 2 (one dangling connection per process execution)
Performance
Issue History
2018-05-24 11:16caristuNew Issue
2018-05-24 11:16caristuAssigned To => platform
2018-05-24 11:16caristuModules => Core
2018-05-24 11:16caristuTriggers an Emergency Pack => No
2018-05-24 11:27hgbotCheckin
2018-05-24 11:27hgbotNote Added: 0104669
2018-05-24 11:27hgbotStatusnew => resolved
2018-05-24 11:27hgbotResolutionopen => fixed
2018-05-24 11:27hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/75b987d87e2d4bd081135d29d6ef2eb3d492277b [^]
2018-05-24 11:27caristuAssigned Toplatform => caristu
2018-05-24 11:28caristuTag Attached: Performance
2018-05-24 11:28caristuReview Assigned To => alostale
2018-05-24 15:49hudsonbotCheckin
2018-05-24 15:49hudsonbotNote Added: 0104675
2018-05-25 09:13alostaleNote Added: 0104693
2018-05-25 09:13alostaleStatusresolved => closed
2018-05-25 09:13alostaleFixed in Version => 3.0PR18Q3

Notes
(0104669)
hgbot   
2018-05-24 11:27   
Repository: erp/devel/pi
Changeset: 75b987d87e2d4bd081135d29d6ef2eb3d492277b
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu May 24 11:20:34 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/75b987d87e2d4bd081135d29d6ef2eb3d492277b [^]

fixes issue 38614: HeartbeatProcess can lead to database connection leaks

  The connection retrieved through OBDal was not being returned to the pool in the cases where the process can not complete its execution:

  - When the heartbeat is not active
  - When Internet is not available

---
M src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java
---
(0104675)
hudsonbot   
2018-05-24 15:49   
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/35639a647532 [^]
Maturity status: Test
(0104693)
alostale   
2018-05-25 09:13   
reviewed