Tomcat error: java.lang.OutOfMemoryError

If Tomcat fails to start and the log shows “java.lang.OutOfMemoryError”, that means the default Tomcat configures a low memory quota you can use. The web instance actually requires higher memory but failed to have enough capacity. The result is “java.lang.OutOfMemoryError.”

To resolve it, it is simple.

In Linux OS, edit /usr/local/tomcat/bin/

export CATALINA_OPTS='-XX:MaxPermSize=512m'

Here, I set 256m. You can specify a higher number to fit your system.


Leave a Reply

Your email address will not be published.