Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037301
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajorsometimes2017-11-16 07:392017-12-12 15:36
ReporterguillermogilView Statuspublic 
Assigned Tomarvintm 
PriorityimmediateResolutionfixedFixed in VersionRR18Q1
StatusclosedFix in branchFixed in SCM revisione73999f8a13d
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomigueldejuana
Regression levelProduction - Confirmed Stable
Regression date2016-01-05
Regression introduced in releaseRR16Q2
Regression introduced by commithttps://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/727a4f04e3e023624bbdc36cdb682e95304129ad [^]
Triggers an Emergency PackNo
Summary

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

DescriptionJava Heap Memory can rise on login if batch size is big and you have a big batch size and an small xmx.
Steps To ReproduceWith 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.
TagsPerformance
Attached Filesdiff file icon issue37301.diff [^] (4,739 bytes) 2017-11-16 10:42 [Show Content]
diff file icon issue37301ImportEntryErrorTest.diff [^] (11,934 bytes) 2017-12-05 09:42 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0037304RR17Q4 scheduledRetail Java Heap Memory can rise on login if batch size is big 
depends on backport 0037305RR17Q3.2 scheduledRetail Java Heap Memory can rise on login if batch size is big 
depends on backport 0037306RR17Q2.5 scheduledRetail Java Heap Memory can rise on login if batch size is big 
caused by defect 0031824RR16Q2 closedmtaal Import entry may not get saved in case of low level database error, webpos sees message as succesfully send 
Not all the children of this issue are yet resolved or closed.

-  Notes
(0100572)
hgbot (developer)
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 (developer)
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 (developer)
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 (developer)
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 (developer)
2017-12-11 11:17

Tested and reviewed
(0100992)
hgbot (developer)
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 (developer)
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
---

- Issue History
Date Modified Username Field Change
2017-11-16 07:39 guillermogil New Issue
2017-11-16 07:39 guillermogil Assigned To => Retail
2017-11-16 07:39 guillermogil Regression level => Production - Confirmed Stable
2017-11-16 07:39 guillermogil Regression date => 2016-01-05
2017-11-16 07:39 guillermogil Regression introduced in release => RR16Q2
2017-11-16 07:39 guillermogil Regression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/727a4f04e3e023624bbdc36cdb682e95304129ad [^]
2017-11-16 07:39 guillermogil Triggers an Emergency Pack => No
2017-11-16 07:40 guillermogil Relationship added caused by 0031824
2017-11-16 07:40 guillermogil Tag Attached: Performance
2017-11-16 10:27 marvintm Status new => scheduled
2017-11-16 10:27 marvintm Assigned To Retail => marvintm
2017-11-16 10:42 marvintm File Added: issue37301.diff
2017-11-17 11:31 hgbot Checkin
2017-11-17 11:31 hgbot Note Added: 0100572
2017-11-17 11:31 hgbot Status scheduled => resolved
2017-11-17 11:31 hgbot Resolution open => fixed
2017-11-17 11:31 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e73999f8a13de3cdd39dff0951919ff0e10c72ea [^]
2017-11-17 11:32 hgbot Checkin
2017-11-17 11:32 hgbot Note Added: 0100573
2017-11-20 18:02 malsasua Issue Monitored: malsasua
2017-11-22 18:47 egoitz Issue Monitored: egoitz
2017-11-27 18:36 hgbot Checkin
2017-11-27 18:36 hgbot Note Added: 0100745
2017-12-05 09:42 migueldejuana File Added: issue37301ImportEntryErrorTest.diff
2017-12-05 09:43 migueldejuana Note Added: 0100928
2017-12-05 18:09 marvintm Type design defect => defect
2017-12-11 11:17 migueldejuana Review Assigned To => migueldejuana
2017-12-11 11:17 migueldejuana Note Added: 0100958
2017-12-11 11:17 migueldejuana Status resolved => closed
2017-12-11 11:17 migueldejuana Fixed in Version => RR18Q1
2017-12-12 15:36 hgbot Checkin
2017-12-12 15:36 hgbot Note Added: 0100992
2017-12-12 15:36 hgbot Checkin
2017-12-12 15:36 hgbot Note Added: 0100993


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker