We are running into a system out-of-memory issue when the agent is collecting binary data(binaries etc.)
from our cloud.
Before starting to download the file/binary, the agent had about 711733 bytes of free memory. In fact, Just before Out-of-Memory reset, the agent still has around ~180KB free system memory but it still resets.
|2020-03-04T05:57:08.206 +00:00 |[Agent] |Agent free memory: 181910|
|2020-03-04T05:57:08.206 +00:00 |[Agent] |processFwResponse: imageLength 632224|
|2020-03-04T05:57:08.206 +00:00 |[Agent] |ERROR: Out of memory (1024kB used)|
|2020-03-04T05:57:18.208 +00:00 |[Status] |Agent restarted: after delay.|
Is there a threshold upon which the agent resets itself? Also, is it possible to change the System memory from 1MB to 2MB ?
Yes. Raise a support ticket in Zendesk and we can discuss this further.
Generally you’re seeing out of memory because there was an intermediate action in your code that caused more memory to be required. That could be encoding data - eg maybe you are base64 encoding your 632,224 byte binary and that would require another 842,966 bytes to be allocated.
Usually you can get round this by chunking data through the agent, but commercial customers can opt to subscribe to larger agents. We’ll cover that in the ticket.
@hugo We are not really encoding the whole of binary in one-go. Rather, we do chunk the binary in 3k slots and encode these chunks before sending it to the device.
Btw, I’ve already raised a ticket - let me know if you need anything from us to get it rolling.
Thanks for your time.
@hugo @rogerlipscombe - Can you guys let know how we can take this forward?
(this was resolved on a ticket)