Tomcat in the deployment application, server error: Java.lang.OutOfMemoryError:PermGen space, the problem is that Tomcat memory allocation is too small.
Workaround 1:
Modify the Tomcat\bin\catalina.bat file.
Found it
Tomcat6 for
Set java_opts=%java_opts%-djava.util.logging.manager=org.apache.juli.classloaderlogmanager- Djava.util.logging.config. file="%catalina_base%\conf \logging.properties"
Tomcat 7 is
Set Logging_manager=-djava.util.logging.manager=org.apache.juli.classloaderlogmanager
This sentence. Add rem comment off in front.
Under it, add the following:
Set java_opts=-server-xms1024m-xmx1024m-xss512k-xx:permsize=64m-xx:maxnewsize=256m-xx:maxpermsize=128m- Djava.awt.headless=True
Reboot tomcat and boot up normally.
The following modifications are configured as follows
if " %logging_manager% " "" Goto Nojulimanagerrem Set Logging_manager=-djava.util.logging.manager= Org.apache.juli.ClassLoaderLogManagerset java_opts=-server-xms1024m-xmx1024m-xss512k-xx:permsize=256m-xx: Maxnewsize=512m-xx:maxpermsize=512m-djava.awt.headless=True
Workaround 2:
Add the following line to the "echo" Using catalina_base: $CATALINA _base "":
REM-----Execute The requested Command---------------------------------------set java_opts=-server-xms512m -xmx512m-xss512k-xx:permsize=128m-xx:maxnewsize=256m-xx:maxpermsize=256m-djava.awt.headless=True
Such as:
REM-----Execute The requested Command---------------------------------------set java_opts=-server-xms512m -xmx512m-xss512k-xx:permsize=128m-xx:maxnewsize=256m-xx:maxpermsize=256m-djava.awt.headless=true echo using catalina_base: "%catalina_base%"echo using catalina_home: "%catalina_home%"echo"%catalina_tmpdir% "
Recommendation:
The same third-party jar file is moved to the Tomcat/shared/lib directory, which reduces the memory consumption of the jar document.
Tomcat performance tuning appears java.lang.OutOfMemoryError:PermGen space