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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038007
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2018-02-27 11:392018-03-01 10:14
ReportermarvintmView Statuspublic 
Assigned Tomarvintm 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionea367b131377
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomigueldejuana
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0038007: LogClient can generate too many useless requests if server is struggling

DescriptionCurrently, the logclient is sent every 30 seconds, and the request has a timeout of 20 seconds. Normally, this is fine, and there is more than enough time to send even the maximum page size in these 20 seconds.

However, sometimes the backend server may be struggling for some other reason, or the bandwidth in the store may not be enough, and finally the request cannot be completed in this time. In this case, as the interval is currently 30 seconds, the terminal will every 30 seconds send another request, which most likely will also fail, thus eventually flooding the server with these requests, and wasting a significant amount of network bandwidth and server resources.

We don't want to change the interval because in normal cases we want to send the logclient information as soon as possible. However, we can increase the timeout of the logclient by default, and the terminal should behave smartly and should not generate another request if the previous one is still being processed.

With these two changes, the terminal will no longer flood the server with requests in case it's struggling, but instead will automatically adjust itself, and stop sending the logclient information if the server is not able to absorb it.
Steps To Reproduce- Create a problem in the server when accepting the logclient (for example, add a breakpoint in LogClientLoader class, or artificially reduce the available bandwidth very significantly).
- Wait for the logclient request. Verify that it fails due to timeout.
- Verify that 10 seconds, later, another request is done, which will also fail in 20 seconds, and 10 seconds later another one will be done, and 20 seconds later it will fail, ...

This was the intended behaviour, but we have now seen that this can create significant problems in an already struggling server,
Proposed Solution- Timeout in logclient request will be significantly increased.
- LogClient process in the terminal will be changed, so that if there is a pending request, a new request will not be triggered, and instead the process will wait for the next cycle to check if a new request can now be done.
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0037851 closedmarvintm Request timeout should apply to the whole process, and not just the query 

-  Notes
(0102867)
hgbot (developer)
2018-02-28 11:31

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: ea367b131377f87ea1a88d16b0e8474e761785fb
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Tue Feb 27 17:53:10 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ea367b131377f87ea1a88d16b0e8474e761785fb [^]

Fixed issue 38007. LogClient will now generate less useless requests. Two main changes have been made:
- Default timeout of the LogClientLoader request has been significantly increased (from 20 seconds, to 5 minutes).
- Now the LogClientLoader request will no longer happen if there is already a request which is not yet finished. Instead, we will do nothing, and the next cycle (so by default 30 seconds later) the system will check again if the request finished, and a new one can be done.
With these two changes, the LogClientLoader requests will work exactly as before if the network and server are fine. However, if the network doesn't have enough bandwidth, or the server is struggling, and the request takes longer than usual, now the request will no longer be canceled, and instead the system will wait for it to finish, instead of canceling it and relaunching it again in the next 30 seconds. This should greatly reduce the number of useless requests which are then canceled, when the system is struggling.

---
M src-db/database/sourcedata/OBMOBC_SERVICES.xml
M web/org.openbravo.mobile.core/source/utils/logClientSyncUtils.js
---
(0102873)
hgbot (developer)
2018-02-28 17:09

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: dce34f05751e5d866f92b2166e4442ca20586292
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Feb 28 17:09:07 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/dce34f05751e5d866f92b2166e4442ca20586292 [^]

Related to issue 38007. Added check also in OB.UTIL.processLogClients function just in case somebody calls it directly

---
M web/org.openbravo.mobile.core/source/utils/logClientSyncUtils.js
---
(0102875)
migueldejuana (developer)
2018-02-28 17:14

Tested and reviewed

- Issue History
Date Modified Username Field Change
2018-02-27 11:39 marvintm New Issue
2018-02-27 11:39 marvintm Assigned To => Retail
2018-02-27 11:39 marvintm Triggers an Emergency Pack => No
2018-02-27 11:40 marvintm Description Updated View Revisions
2018-02-27 11:40 marvintm Description Updated View Revisions
2018-02-27 11:41 marvintm Description Updated View Revisions
2018-02-27 11:58 alostale Tag Attached: Performance
2018-02-27 11:59 alostale Relationship added related to 0037851
2018-02-27 13:36 marvintm Status new => scheduled
2018-02-27 13:36 marvintm Assigned To Retail => marvintm
2018-02-28 11:31 hgbot Checkin
2018-02-28 11:31 hgbot Note Added: 0102867
2018-02-28 11:31 hgbot Status scheduled => resolved
2018-02-28 11:31 hgbot Resolution open => fixed
2018-02-28 11:31 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ea367b131377f87ea1a88d16b0e8474e761785fb [^]
2018-02-28 11:33 marvintm Review Assigned To => migueldejuana
2018-02-28 17:09 hgbot Checkin
2018-02-28 17:09 hgbot Note Added: 0102873
2018-02-28 17:14 migueldejuana Note Added: 0102875
2018-02-28 17:14 migueldejuana Status resolved => closed
2018-03-01 10:14 alostale Issue Monitored: alostale


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker