The following error is reported when Tomcat is started:
Java. lang. OutOfMemoryError: PermGen space
Solution:
Configure the memory size. There are three cases as follows:
A): If the tomcat plug-in of eclipse starts tomcat, add the following JVM parameters to the "window" menu-"Preferences"-"Tomcat"-"JVM Settings:
-Xms128M-Xmx512M-XX: PermSize = 128 M-XX: MaxPermSize = 256 M
B): If tomcat is installed as a windows Service and started from the service, open the Registry Editor and navigate: HKEY_LOCAL_MACHINE \ SOFTWARE \ Apache Software Foundation \ Procrun 2.0 \ tomcat6 \ Parameters \ Java (the Win7 X64 system is located in HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Apache Software Foundation \ Procrun
2.0 \ tomcat6 \ Parameters \ Java)
Double-click the "Options" key in the right window and add the following line:
-XX: PermSize = 128 M
-XX: MaxNewSize = 256 m
-XX: MaxPermSize = 256 m
C): If tomcat is started using the command line method, modify the script file (catalina in Windows. bat, Which is catalina in Linux. sh). In the same way, add the above parameters to the JAVA_OPTS variable.