I got the below error
"java.lang.OutOfMemoryError: PermGen space"
In my catalina.bat
file, where is the appropriate place for enter set JAVA_OPTS
parameter? Bottom of the file or any other place?
Please read this: OutOfMemory Error and make sure your application doesn't have memory leak and excessive memory usage.
To change the settings, create a file named setenv.bat
for windows or setenv.sh
for Linux with entry as below:
Windows:
set JAVA_OPTS="-Xms256m -Xmx512m"
Linux:
export JAVA_OPTS="-Xms256m -Xmx512m"
Simply put this(setenv.bat/setenv.sh) file in %CATALINA_HOME%\bin\
folder. Your command file (catalina.bat/catalina.sh
) already has a statement as below:
Windows:
if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
Linux:
if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
. "$CATALINA_BASE/bin/setenv.sh"
elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
. "$CATALINA_HOME/bin/setenv.sh"
fi
This will take care the rest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With