You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Indu Devanath <in...@speedbuildersystems.com> on 2007/01/23 16:00:40 UTC

Increasing Max Memory in Tomcat resulting in failed startup of Tomcat

Hello all,

 

I as using Tomcat version 5.0.28 as a windows service on a HP PROLIANT DL380
G4 7/3.0 2MB 1GB (Dual processors) running Windows 2003 server.  I have 4 GB
of ram installed in the server.  Under system information Windows has
3583.47 MB for Total Physical Memory. Ok, here is the issue,  I right
clicked on the Tomcat icon in the system tray, clicked on configure, then on
the java tab.  Under Initial memory pool I have 512 MB and under Maximum
Memory Pool, I put in 2048 (I had 1024 previously)  I tried to start tomcat
but It wouldn't start up.  Any ideas why Tomcat would not take the Max
memory setting of 2GB.  

 

I did find an entry from the archives (see below),  if I am understanding
Chuck's reply (from entry below) there should be a 2GB limit not a 1GB limit
correct?  On my test box, which has 2GB of memory, I was able to enter
"1500" under the max memory pool and Tomcat started just fine.  I went to
"1600" and Tomcat wouldn't start.

 

Can anyone offer any help on this subject.

 

Thanks!

 

----------------------------------------------------------------------------
-------------------------------------------------

 

> From: Joe Reger, Jr. [mailto:joe@joereger.com] 
> Subject: Tomcat Won't Start When >1024Mb JVM Memory Specified
> 
> Is there a 1Gb limit on the JVM?  On Tomcat? 

Not on those, but Windows normally provides only 2GB of virtual space
for each process.  (There's an initialization switch that can change
this to 3GB, but that introduces some other issues.)  Unfortunately,
this space is fragmented, and the JVM heap is allocated in one
contiguous chunk (at least it was in 1.4.1).  I'm a bit surprised you
ran out at 1GB.

> Should I configure by editing startup.bat/catalina.bat instead?

Definitely makes it easier to fiddle with the values until you find the
maxima.  You don't need to start Tomcat to play with -Xmx and the other
heap settings - a simple HelloWorld will suffice.  Always set -Xms and
-Xmx to the same value when you're trying to find the limit.

- Chuck

 


RE: Increasing Max Memory in Tomcat resulting in failed startup of Tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Indu Devanath [mailto:indu@speedbuildersystems.com] 
> Subject: Increasing Max Memory in Tomcat resulting in failed 
> startup of Tomcat
>  
> if I am understanding Chuck's reply (from entry below) 
> there should be a 2GB limit not a 1GB limit correct?

There's a 2GB virtual space limit for the entire process, not just the
Java heap.  That 2GB has to include the C heap, stacks, DLLs, launcher
code, JIT-generated code from .class files, etc.  Since Windows does a
superb job of fragmenting the 2GB and the entire Java heap has to fit in
one contiguous chunk of virtual space, it's not surprising at all that
-Xmx1500m worked, and -Xmx1600m didn't.  Adding more real memory has no
effect on the virtual space available to the process.  If you want a
bigger heap, a 64-bit OS and JVM should be in your future.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org