I have went through many links and similar questions related to java.lang.OutOfMemoryError: Java heap space but none of the solutions resolved my problem. So here is my question, I have a web application where user uploads a Excel file that has records around 2500 my application reads contents of this file and inserts them into Database. but after inserting 700 records I am getting exception as throwable object caught= java.lang.OutOfMemoryError: Java heap space
Same code works if file contains 500 or less than 500 records. following is my JAVA_OPTS & CATALINA_OPTS variable in catalina.bat file
JAVA_OPTS=-Xmx1536m -XX:MaxPermSize=128m
CATALINA_OPTS=-Xms512m -Xmx512m
can anyone please tell me what can be done to resolve this issue?