Wednesday, December 7, 2011

Java OutofMemoryError on Tomcat

Edit your catalina.sh (find in tomcat-folder/bin/catalina.sh)
 
Add following lines at the beginning
 
JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 
-server -Xms512m -Xmx1024m
-XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m 
-XX:MaxPermSize=256m -XX:+DisableExplicitGC"
 
Then start your tomcat, using startup.sh 

No comments: