Offline Sync Mobile

Hello,


I am facing the below error: A fatal error has occurred. Please contact OutSystems support: Failed to allocate a 106199360 byte allocation with 25165824 free bytes and 87MB until OOM, max allowed footprint 134521152, growth limit 201326592


I am facing the above error while Offline sync.

Can somebody please help me to resolve this error.


TIA

Hi Priya,

This is something related to OutOfMemory Exception. It seems you are trying to store more than the max limit data allowed. Is it the case even when you launch the app initially? Maybe you are not removing the data on logout & due to that the memory remains occupied.


 Find how to configure LargeHeap in Manifest Settings for Android/iOS on Outsystem, so that you will get more memory than normal allocation. For iOS, it is not possible to modify the heap.


For instance, you can try with Android in ExtensibilityConfiguration :

"android": [{
            "name": "largeHeap",
            "value": "true"
        }]

assif_tiger wrote:

Hi Priya,

This is something related to OutOfMemory Exception. It seems you are trying to store more than the max limit data allowed. Is it the case even when you launch the app initially? Maybe you are not removing the data on logout & due to that the memory remains occupied.


 Find how to configure LargeHeap in Manifest Settings for Android/iOS on Outsystem, so that you will get more memory than normal allocation. For iOS, it is not possible to modify the heap.


For instance, you can try with Android in ExtensibilityConfiguration :

"android": [{
            "name": "largeHeap",
            "value": "true"
        }]

Hello assif_tiger,


Thank you for your solution.

Can you please tell me if an entity is having 87mb of data, will this create any problem during sync at the time of login? Because I do have a requirement to sync such a large amount of data and the above problem which I have mentioned is during first time login.


Solution

It's strange that often on login you are facing the same.

Then the reason couldn't be the AMR i.e what I was proposing for a largeheap fix, so that you will get a 512mb instead normal 64mb app.


Perhaps you told that the app is loading a large amount of data, so can u just tell me :

- how many local entities are for sync.

- any entity which is loading more than 100k records

If incase any entity loading more then 100k records at a time then it's better to ho with a pagination approach for sync.

Don't send or load all records once at a time.

You can check the same, I am sure the issue is with no. of records of any x entity.


Hope it helps,

Assif


Solution

assif_tiger wrote:

It's strange that often on login you are facing the same.

Then the reason couldn't be the AMR i.e what I was proposing for a largeheap fix, so that you will get a 512mb instead normal 64mb app.


Perhaps you told that the app is loading a large amount of data, so can u just tell me :

- how many local entities are for sync.

- any entity which is loading more than 100k records

If incase any entity loading more then 100k records at a time then it's better to ho with a pagination approach for sync.

Don't send or load all records once at a time.

You can check the same, I am sure the issue is with no. of records of any x entity.


Hope it helps,

Assif


Hi Assif,


Yes the issue was with the number of records. I was able to resolve the issue. 

Thank you for your help!

Happy to know.

Would like to know how you fixed the same.

It will be helpful for other folks to refer the same idea.


assif_tiger wrote:

Happy to know.

Would like to know how you fixed the same.

It will be helpful for other folks to refer the same idea.


Hi Asif,

During the sync, we loaded the data in parts because of the issue got resolved and I am to login into the application properly. However I was waiting for some other approach but as you metioned above we can do this.


Thank you