My Java program threw an OutOfMemoryError. How do I debug and fix this problem?
Many newcomers to Java struggle to cope with an OutOfMemoryE
This problem occur when tomcat goes out of memory i.e tomcat has less memory configured then the application required to run application.
So to overcome this problem go to the tomcat bin directory and create a new file setenv.bat and define PermSize in that file as below:
set JAVA_OPTS=-Dfile.encoding=UTF-8 -Xms512m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=1024m
PermSize can be set to more higher range according to the application requirement.