Tomcat reports java.lang.OutOfmemoryError: PermGen Space under linux

 

Multiple projects are deployed in tomcat under linux, resulting in memory overflow, as follows

 

java.lang.OutOfmemoryError: PermGen Space

 

Adding the following memory-increasing settings to catalina.sh JAVA_OPTS does not take effect, and setting CATALINA_OPTS does not take effect, (viewed by ps aux|grep java, there is no following parameter)

 

JAVA_OPTS="$JAVA_OPTS -server -Xms1024m -Xmx5120m -XX:PermSize=256m -XX:MaxPermSize=512m"

 

Check the JAVA_OPTS parameter of catalina.sh and there is the following paragraph

 

# Control Script for the CATALINA Server
#
# Environment Variable Prerequisites
#
#   Do not set the variables in this script. Instead put them into a script
#   setenv.sh in CATALINA_BASE/bin to keep your customizations separate.

 

So you should set the parameters of memory increase in setenv.sh

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326124094&siteId=291194637