OutOfMemory issue application crashes

0
Hi, I am facing this error since a long time.I am uploading an excel which is having around 40k records. It was getting uploaded but intermittently it is throwing CRITICAL - ActionManager: java.lang.OutOfMemoryError: Java heap space. Now when I am trying to upload around 60k records, it is not even importing .It is throwing java.lang.OutOfMemoryError: Java heap space. I have increased my cloud resource from Strato to Meso but it is not working. What should be my next course of action. Please help.It is urgent.     
asked
1 answers
0

 

The "java.lang.OutOfMemoryError: Java heap space" error typically occurs when your Java application runs out of available heap memory.

You can try following options:

 

You can try increasing the heap size allocated to your Mendix application. In Mendix, this can be done in the m2ee.yaml configuration file by modifying the m2ee section, particularly the heap_size property. For example:

m2ee:
  ...
  heap_size: 1024M
 

Note: Increasing the heap size will provide more memory for your application to work with, but be cautious not to allocate too much memory, as it can affect the overall performance of your server.

Option 2: 

Review your Excel import process to ensure it's as efficient as possible. Consider breaking the import process into smaller chunks or batches rather than trying to import the entire 60k records at once.

Check if there are any memory-intensive operations during the import process that can be optimized.

Option 3: 

Consider using streaming APIs or libraries like Apache POI streaming to read the Excel file in smaller chunks instead of loading the entire file into memory. This can significantly reduce memory usage during import.

 

Monitor the resource usage of your Mendix application during the import process to identify memory bottlenecks. You can use tools like JConsole or VisualVM to monitor JVM memory usage.

answered