Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037301Retail ModulesWeb POSpublic2017-11-16 07:392017-12-12 15:36
guillermogil 
marvintm 
immediatemajorsometimes
closedfixed 
5
 
RR18Q1 
migueldejuana
Production - Confirmed Stable
2016-01-05
RR16Q2
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/727a4f04e3e023624bbdc36cdb682e95304129ad [^]
No
0037301: Java Heap Memory can rise on login if batch size is big
Java Heap Memory can rise on login if batch size is big and you have a big batch size and an small xmx.
With a lot of products, big batch size (> 60000) and an small xmx in CATALINA_OPTS (1GB)
Try to login in WebPOS
You will have a Java heap memory.
Performance
depends on backport 0037304RR17Q4 closed marvintm Java Heap Memory can rise on login if batch size is big 
depends on backport 0037305RR17Q3.2 closed marvintm Java Heap Memory can rise on login if batch size is big 
caused by defect 0031824RR16Q2 closed mtaal Import entry may not get saved in case of low level database error, webpos sees message as succesfully send 
diff issue37301.diff (4,739) 2017-11-16 10:42
https://issues.openbravo.com/file_download.php?file_id=11291&type=bug
diff issue37301ImportEntryErrorTest.diff (11,934) 2017-12-05 09:42
https://issues.openbravo.com/file_download.php?file_id=11353&type=bug
Issue History
2017-11-16 07:39guillermogilNew Issue
2017-11-16 07:39guillermogilAssigned To => Retail
2017-11-16 07:39guillermogilResolution time => 1512601200
2017-11-16 07:39guillermogilRegression level => Production - Confirmed Stable
2017-11-16 07:39guillermogilRegression date => 2016-01-05
2017-11-16 07:39guillermogilRegression introduced in release => RR16Q2
2017-11-16 07:39guillermogilRegression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/727a4f04e3e023624bbdc36cdb682e95304129ad [^]
2017-11-16 07:39guillermogilTriggers an Emergency Pack => No
2017-11-16 07:40guillermogilRelationship addedcaused by 0031824
2017-11-16 07:40guillermogilTag Attached: Performance
2017-11-16 10:27marvintmStatusnew => scheduled
2017-11-16 10:27marvintmAssigned ToRetail => marvintm
2017-11-16 10:42marvintmFile Added: issue37301.diff
2017-11-17 11:31hgbotCheckin
2017-11-17 11:31hgbotNote Added: 0100572
2017-11-17 11:31hgbotStatusscheduled => resolved
2017-11-17 11:31hgbotResolutionopen => fixed
2017-11-17 11:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e73999f8a13de3cdd39dff0951919ff0e10c72ea [^]
2017-11-17 11:32hgbotCheckin
2017-11-17 11:32hgbotNote Added: 0100573
2017-11-20 18:02malsasuaIssue Monitored: malsasua
2017-11-22 18:47egoitzIssue Monitored: egoitz
2017-11-27 18:36hgbotCheckin
2017-11-27 18:36hgbotNote Added: 0100745
2017-12-05 09:42migueldejuanaFile Added: issue37301ImportEntryErrorTest.diff
2017-12-05 09:43migueldejuanaNote Added: 0100928
2017-12-05 18:09marvintmTypedesign defect => defect
2017-12-11 11:17migueldejuanaReview Assigned To => migueldejuana
2017-12-11 11:17migueldejuanaNote Added: 0100958
2017-12-11 11:17migueldejuanaStatusresolved => closed
2017-12-11 11:17migueldejuanaFixed in Version => RR18Q1
2017-12-12 15:36hgbotCheckin
2017-12-12 15:36hgbotNote Added: 0100992
2017-12-12 15:36hgbotCheckin
2017-12-12 15:36hgbotNote Added: 0100993

Notes
(0100572)
hgbot   
2017-11-17 11:31   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: e73999f8a13de3cdd39dff0951919ff0e10c72ea
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Nov 16 10:40:14 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e73999f8a13de3cdd39dff0951919ff0e10c72ea [^]

Fixed issue 37301. Avoid usage of intermediate StringWriters so that response doesn't take too much heap.
The main problem is that the two intermediate StringWriters accumulate the whole response before it is sent back to the client. This causes Java Heap memory problems in case the batching is set to a big amount, and concurrency is high.
The solution is to remove these intermediate StringWriters. We have verified that the messages are not lost even in the case of low level database problems, because the client correctly detects the problem, and doesn't remove the records, and instead tries to send them again in the next synchronization. However, we have added the exception fields in case the import entry fails to be written, because it makes sense to have them properly set.

---
M src/org/openbravo/mobile/core/process/MobileService.java
M src/org/openbravo/mobile/core/process/MobileServiceProcessor.java
---
(0100573)
hgbot   
2017-11-17 11:32   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 734db1c37a88a3caefe1748ea330631529542f3b
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Nov 17 11:32:40 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/734db1c37a88a3caefe1748ea330631529542f3b [^]

Related to issue 37301. Remove outdated comment

---
M src/org/openbravo/mobile/core/process/MobileService.java
---
(0100745)
hgbot   
2017-11-27 18:36   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 7b1d7e3f1163fabc6bc8edf8889759a0269cf965
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Nov 27 18:36:24 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7b1d7e3f1163fabc6bc8edf8889759a0269cf965 [^]

Related to issue 37301. Force generation of a 500 error in case ImportEntry fails to ensure that the ticket is preserved in the client side.

---
M src/org/openbravo/mobile/core/process/MobileServiceProcessor.java
---
(0100928)
migueldejuana   
2017-12-05 09:43   
I have attached a test:

- Add a test where Import Entry insert fails. Ensure that failed order and next order are not lost.

The test is not working fine yet
(0100958)
migueldejuana   
2017-12-11 11:17   
Tested and reviewed
(0100992)
hgbot   
2017-12-12 15:36   
Repository: tools/automation/pi-mobile
Changeset: de175f875d1edba5a75c5ebc3aeac77c562f3597
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Mon Dec 04 15:23:50 2017 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/de175f875d1edba5a75c5ebc3aeac77c562f3597 [^]

Related to issue 0037301: Java Heap Memory can rise on login if batch size is big

- Add a test where Import Entry insert fails. Ensure that failed order and next order are not lost.

---
M src-test/org/openbravo/test/mobile/core/utils/AllowedErrorsHelper.java
M src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/SynchronizationHelper.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/terminals/WebPOSTerminalHelper.java
A src-test/org/openbravo/test/mobile/retail/mobilecore/database/DatabaseHelperStatement.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I37301_ImportEntryError.java
---
(0100993)
hgbot   
2017-12-12 15:36   
Repository: tools/automation/pi-mobile
Changeset: 84d698ca45a467f8515edb7032017ac7fe0ff8ad
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Mon Dec 11 18:47:30 2017 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/84d698ca45a467f8515edb7032017ac7fe0ff8ad [^]

Related to issue 0037301: Java Heap Memory can rise on login if batch size is big

- Remove ';' at the en of the sql
- Add the author
- Add a validation to avoid ; error

---
M src-test/org/openbravo/test/mobile/retail/mobilecore/database/DatabaseHelperStatement.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I37301_ImportEntryError.java
---