Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0054090Openbravo ERPA. Platformpublic2023-12-11 09:352023-12-20 07:34
alostale 
alostale 
normalmajorhave not tried
closedfixed 
5
 
 
Core
No
0054090: connection leak on Tomcat start if a process is missfired
When there are missfired background processes on Tomcat start, one connection is leaked not being returned to the pool.
1. Configure the connection pool to use very few connections, ie. 4. (This step is not necessary but it make it easier to see the problem).
2. Schedule a process (ie. alert process) to run every 5 seconds.
3. Stop Tomcat and wait 5 secs.
4. Start Tomcat and wait 30 secs for quartz to start.
  - There will be a missfired instance of the scheduled process (OK)
5. Log in BO and perform some operations (ie. open a couple of windows and refresh grid some times).
  - ERROR: check pg_stat_activity, there is an idle connection whose state_change is at the time Tomcat was started and the query is INSERT INTO AD_Process_Run...
  Configuring the pool to log abandoned connections (db.pool.logAbandoned=true and db.pool.suspectTimeout=10), it will point to ProcessMonitor.triggerMisfired
No tags attached.
related to defect 0054081 closed Triage Platform Base Regression: Number of database connection kept open in idle tomcat went up by +10 
related to defect 0054029 closed AugustoMauch Connection leak when using scheduling process requests based on process groups 
Issue History
2023-12-11 09:35alostaleNew Issue
2023-12-11 09:35alostaleAssigned To => Triage Platform Base
2023-12-11 09:35alostaleModules => Core
2023-12-11 09:35alostaleTriggers an Emergency Pack => No
2023-12-11 09:36alostaleRelationship addedrelated to 0054081
2023-12-11 09:36alostaleAssigned ToTriage Platform Base => alostale
2023-12-11 09:38alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=27217#r27217
2023-12-11 09:54alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=27218#r27218
2023-12-11 09:58alostaleRelationship addedrelated to 0054029
2023-12-15 08:32hgbotResolutionopen => fixed
2023-12-15 08:32hgbotStatusnew => resolved
2023-12-15 08:32hgbotFixed in Version => PR24Q1
2023-12-15 08:32hgbotNote Added: 0158251
2023-12-20 07:34alostaleStatusresolved => closed
2023-12-20 07:34alostaleFixed in VersionPR24Q1 =>

Notes
(0158251)
hgbot   
2023-12-15 08:32   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: dda300b5e5a8d9bf67f4d26d2ad05e636ff03458
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 15-12-2023 07:32:12
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/dda300b5e5a8d9bf67f4d26d2ad05e636ff03458 [^]

fixed BUG-54090: connection leak on Tomcat start if a process is missfired

ProcessMonitor.triggerMissfired method retrieved a connection from the pool but
it never returned it after termination.

---
M src/org/openbravo/scheduling/ProcessMonitor.java
---