Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0029936 | Openbravo ERP | 09. Financial management | public | 2015-05-20 12:02 | 2015-07-16 11:23 |
|
Reporter | egoitz | |
Assigned To | umartirena | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | dmiguelez |
OBNetwork customer | OBPS |
Web browser | |
Modules | Core |
Support ticket | 36076 |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0029936: Java heap error when executing the costing background process with 1024mb on Xmx |
Description | Java heap error when executing the costing background process with 1024mb on Xmx |
Steps To Reproduce | -Configure an environment assigning 1024mb to tomcat on xmx variable.
-Execute the costing backgroudn process
*java heap error is raised |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | depends on | backport | 0029937 | 3.0PR15Q2.3 | closed | umartirena | Java heap error when executing the costing background process with 1024mb on Xmx | depends on | backport | 0029938 | 3.0PR15Q1.6 | closed | umartirena | Java heap error when executing the costing background process with 1024mb on Xmx |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2015-05-20 12:02 | egoitz | New Issue | |
2015-05-20 12:02 | egoitz | Assigned To | => Triage Finance |
2015-05-20 12:02 | egoitz | OBNetwork customer | => Yes |
2015-05-20 12:02 | egoitz | Modules | => Core |
2015-05-20 12:02 | egoitz | Support ticket | => 36076 |
2015-05-20 12:02 | egoitz | Resolution time | => 1432504800 |
2015-05-20 12:02 | egoitz | Triggers an Emergency Pack | => No |
2015-05-20 12:02 | egoitz | Assigned To | Triage Finance => umartirena |
2015-05-20 12:34 | umartirena | Regression level | => Production - Confirmed Stable |
2015-05-20 12:34 | umartirena | Regression date | => 2015-03-04 |
2015-05-20 12:34 | umartirena | Regression introduced in release | => 3.0PR15Q1.3 |
2015-05-20 12:34 | umartirena | Regression introduced by commit | => https://code.openbravo.com/erp/devel/pi/rev/115dc304149663ee5e27d18077840054823b35ca [^] |
2015-05-20 12:34 | umartirena | Triggers an Emergency Pack | No => Yes |
2015-05-20 12:34 | umartirena | Status | new => scheduled |
2015-05-20 13:07 | umartirena | Note Added: 0077597 | |
2015-05-21 08:04 | umartirena | Regression level | Production - Confirmed Stable => |
2015-05-21 08:04 | umartirena | Regression date | 2015-03-04 => |
2015-05-21 08:04 | umartirena | Regression introduced in release | 3.0PR15Q1.3 => |
2015-05-21 08:04 | umartirena | Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/115dc304149663ee5e27d18077840054823b35ca [^] => |
2015-05-21 08:04 | umartirena | Triggers an Emergency Pack | Yes => No |
2015-05-21 08:04 | umartirena | Note Edited: 0077597 | bug_revision_view_page.php?bugnote_id=0077597#r8601 |
2015-06-03 09:15 | umartirena | Note Edited: 0077597 | bug_revision_view_page.php?bugnote_id=0077597#r8735 |
2015-06-04 17:47 | hgbot | Checkin | |
2015-06-04 17:47 | hgbot | Note Added: 0078094 | |
2015-06-04 17:47 | hgbot | Status | scheduled => resolved |
2015-06-04 17:47 | hgbot | Resolution | open => fixed |
2015-06-04 17:47 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/654d4ad1872f1468265ac30de77d055fcd63abde [^] |
2015-06-04 18:05 | dmiguelez | Review Assigned To | => dmiguelez |
2015-06-04 18:05 | dmiguelez | Note Added: 0078097 | |
2015-06-04 18:05 | dmiguelez | Status | resolved => closed |
2015-06-06 16:53 | hudsonbot | Checkin | |
2015-06-06 16:53 | hudsonbot | Note Added: 0078128 | |
2015-07-16 11:23 | hgbot | Checkin | |
2015-07-16 11:23 | hgbot | Note Added: 0078847 | |
Notes |
|
(0077597)
|
umartirena
|
2015-05-20 13:07
(edited on: 2015-06-03 09:15) |
|
Test Plan:
-Configure an environment assigning 1024mb to tomcat on xmx variable.
-Execute the costing background process.
We have an environment in which this issue could be tested.
*Realize that Costing Background process works as expected and no java heap error is raised
|
|
|
(0078094)
|
hgbot
|
2015-06-04 17:47
|
|
Repository: erp/devel/pi
Changeset: 654d4ad1872f1468265ac30de77d055fcd63abde
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Tue Jun 02 09:12:55 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/654d4ad1872f1468265ac30de77d055fcd63abde [^]
Fixes bug 29708, Fixes bug 29936: Improve performance and memory problems
2 Problems are happening in Costing Background process:
1) Java Heap error: This problem happens because getTransactions method can load on memory a lot of objects and even an ScrollableResult is being used the following sentence 'OBDal.getInstance().getConnection().setHoldability(ResultSet.HOLD_CURSORS_OVER_COMMIT)' prevents in fact to scroll properly the ScrollableResult. To avoid this issue the query of getTransactions method has been changed to return only 1000 records. So, instead of calling just once this method it is done once each 1000 records.
Also instead of returning a list of 1000 MaterialTransaction objects, that can be a relatively big amount of objects to load in memory, only the Ids are returned and each id the it is instanced on each iteration.
2) Performance problems: The process has a performance issue because it does a commit on each iteration of the list. Now, this has been changed to do commit every 1000 records, and in case that an exception is raised on a certain iteration a new method has been added in catch clause to calculate the cost of the transactions that have been rolledback but which there were properly calculated.
---
M src/org/openbravo/costing/CostingBackground.java
---
|
|
|
|
|
|
|
|
|
(0078847)
|
hgbot
|
2015-07-16 11:23
|
|
|