Question: Start the Tomcat times error, and keep on going
Exception in Thread "Http-bio-8080-exec-2" Java.lang.OutOfMemoryError:PermGen
Exception in Thread "http-bio-8080-exec-3" Java.lang.OutOfMemoryError:PermGen
Exception in Thread "http-bio-8080-exec-4" Java.lang.OutOfMemoryError:PermGen
Exception in Thread "Timer-0" Java.lang.OutOfMemoryError:PermGen
Solve
Memory Overflow AH ~
Workaround:
1, manually set MaxPermSize size
Modify Tomcat_home/bin/catalina.bat (catalina.sh under Linux) and add the following line to the "echo" Using catalina_base: $CATALINA _base "":
setjava_opts=%java_opts%-server-xx:permsize=128m-xx:maxpermsize=512m
Catalina.sh under:
java_opts= "$JAVA _opts-server-xx:permsize=128m-xx:maxpermsize=512m"
2, modify the contents of the Tomcat_home/bin/catalina.bat file: After%_execjava%%java_opts% add:
-xms=256m-xmx512m
Look, there are spaces around.
For example:%_execjava%%java_opts%-xms=256m-xmx512m (space), the contents of the following unchanged
3, you can consider the same third-party jar files copied to the Tomcat/shared/lib directory, which can reduce the memory of the jar file re-use.
4,Increase the starting memory parameters for the JDK specified by the Tomcat
-xms128m-xmx512m-xx:permsize=128m-xx:maxpermsize=128m