You are on page 1of 2

Tomcat Setting

1- Configured maximum Size for war apps Solution


Go to the web.xml of the manager application (for instance it could be under /tomcat7/webapps/manager/WEB-INF/web.xml. Increase the max-file-size and max-request-size:

<multipart-config> <! 50MB max > <max-file-size>52428800</max-file-size> <max-request-size>52428800</max-request-size> <file-size-threshold>0</file-size-threshold> </multipart-config> 2- OutOfMemoryError: PermGen space Its usually happened when the Tomcat start and stop few times. Its just funny, however you can fine tune it with some minor changes in the Tomcat configuration setting. By default, Tomcat assigned very little memory for the running process, you should increase the memory by make change in the startup.bat and catalina.bat or startup.sh and catalina.sh files in your tomcat/bin directory. Solution (Windows) 1) Find where is cataline.bat located. We need to make some changes in catalina.bat file. 2) Assign following line to JAVA_OPTS variable and add it into catalina.bat file. set JAVA_OPTS="-Xms1024m -Xmx10246m -XX:NewSize=256m -XX:MaxNewSize=356m XX:PermSize=256m -XX:MaxPermSize=356m" 3) If not work set set CATALINA_OPTS=-Xms512m -Xmx512m -XX:MaxPermSize=256m

Or ( for 2 and 3) add at the end of the text box Java Options of configure tomcat 7 -Xms512M -Xmx512M -Xss1024K -XX:MaxPermSize=512M -XX:PermSize=512M

4) Done. Restart Tomcat. You should change the Xms and PermSize value base on your server capability.

You might also like