tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Memory settings
Date Tue, 09 Mar 2010 20:59:01 GMT
Mats Eklund wrote:
> Hi,
> I'm using Tomcat 5.5 on Windows and am sometimes experiencing exceptions thrown in my
web application:
> "java.lang.OutOfMemoryError: Java heap space". I will profile my
> application to see if this can be avoided by changing the code,
> however, I'm also interested to know whether and how memory available
> to the application can be configured.
Short version :
(Presuming you installed Tomcat using the "service installer",)

go to the Tomcat/bin directory and double-click the tomcat5w.exe 
program. This is a GUI allowing you, in one of the tabs, to set the JVM 
options used to run Java, which runs Tomcat.
Use the options "-Xms256m -Xmx256m" for example to set the size of the 
Heap at start to 256 MB (-Xms) and maximum size 256 MB (-Xmx).
Setting both to the same value is a bit more efficient, because it 
avoids the JVM having to keep track and resize this dynamically.

Long version :

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message