java.lang.OutOfMemoryError: Java heap space

0
M2EE: An unhandled error occurred in the MxRuntime. M2EE: java.lang.OutOfMemoryError: Java heap space   Can anyone please advice me on how to fix these errors. The application crashes also. This is an application that has already been deployed on the cloud and it is in production. 
asked
3 answers
1

If you are creating/committing 50,000 objects in one go, then the application will run out of memory. Try to execute or create in batches of around 1000-3000 objects instead of committing in one go.

answered
0

Where does it crash? Locally or in the cloud?

If locally, you can give your local server a bigger java heap size Project>Settings>Your configiration> Server>Java heap.

But maybe it's good too check why you are running out of memory? What is your application doing?

answered
0

i have the create and retrieves in batches of 50’s, but at the end, i commit all of the items (around 100,000) at once. Would you advice me to commit these items in batches too? if so, how would i use batching to commit it? Can i have a retrieve retrieving all the items i want to commit in batches , and committing at the end of the retrieve, then increment the offset?

answered