Solution to memory insufficiency in tomcat deployment: tomcat deployment
Due to memory overflow, should I increase the memory in TOMCAT/bin/catalina. sh or TOMCAT/bin/catalina. bat settings?
In windows, the batch processing is. bat and. cmd is a file with the extension, so modify catalina. bat and linux are often. sh, some files without an extension, so modify catalina. sh
1. Find the catalina. bat file under the bin directory in windows and open it with notepad: Find the following section and add the Red Line: mainEntrydel/Q "% TEMP % \ % ~ Nx0.run "> NUL 2> & 1
Rem Guess CATALINA_HOME if not definedset JAVA_OPTS =-Xms64m-Xmx1024m-XX: MaxNewSize = 256 m-XX: maxPermSize = 256 mset "CURRENT_DIR = % cd %" if not "% CATALINA_HOME %" = "" goto gotHomeset "CATALINA_HOME = % CURRENT_DIR %" if exist "% CATALINA_HOME % \ bin \ catalina. bat "goto okhommcm .. set "CATALINA_HOME = % cd %" cd "% CURRENT_DIR %": gotHome
Tomcat7 is about 100 rows
2. in Linux, find the catalina. sh file under the bin directory and open it with notepad: Find the following section and add the red line:
# $ Id: catalina. sh 885002 2009-11-27 20: 51: 03Z markt $ # export JAVA_OPTS = '-Xms512m-Xmx1024m-XX: MaxPermSize = 256m' # OS specific support. $ var _ must _ be set to either true or false. cygwin = falseos400 = falsedarwin = falsecase "'uname'" inCYGWIN *) cygwin = true; OS400 *) os400 = true; Darwin *) darwin = true; esac