java.lang.OutOfMemoryError: Java heap space

0
Hi ,   I'm running a microflow in the acceptance environment and processing 1 lakhs records in that microflow. The microflow is breaking and throwing java.lang.OutOfMemoryError: Java heap space error. Can you please guide me how to resolve this issue. Also is there any way to increase the Java Object Heap space in the acceptance environment.   Thanks in advance
asked
1 answers
0

Abrar,

This error means you are trying to process too many records at once and the Java Virtual Machine runs out of memory.  One way to get around this error is to process the records in batches.  A development pattern I have used to do this is to add some attributes to the entity that I am processing:

  • Processed (boolean - default False)
  • Processed Date (datetime)

In the microflow that processes these records,

  • retrieve a certain number of unprocessed records by using Range > Custom in a retrieve action and use XPath [not(Processed)]
  • set the Processed boolean to true for each record you process and the Processed Date to current date time. 

After making those changes, you can run the microflow as many times as needed to process all records.

 

Hope that helps,

Mike

answered