Hi Naga,
Honestly your 2nd picture is blur I could not see the log clearly, but last time I meet Java Heap Space error is cause by I have pulled too much text data trying to convert them into objects to be processed and committed.
You can try monitor your device memory in task manager, see if what is happening. I suspect there is microflow or any after startup microflow is having too much data processing in once when your application startup after multiple runs.
If your problem is the data being in transaction is too much until reach your device limit, you can try to limit the microflow call handle chunk of data 1000-5000 per loop, so the microflow does not over your device's memory limit.