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.