tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Charles Huey" <>
Subject RE: 1067 error when starting service after allocating more memory to JVM
Date Sun, 08 Aug 2004 06:44:04 GMT
Sorry to be a pain, but I'm not exactly sure I understood what I was
supposed to do from your fourth paragraph?  Could you possibly give me
an example of how to find that out?  Aren't the parameters -Xmx and -Xms
specific to tomcat.exe and not to Windows?  I'm also not sure if you
meant that I should put -version on the end of my command line string
that I mentioned in the first post, or if I should do it just with the
memory flags, or what...  I'm just saying that I don't know how to find
out what my environment can handle!  

Thanks for the help,

----- Original message -----
From: "Caldarale, Charles R" <>
To: "Tomcat Users List" <>
Date: Sat, 7 Aug 2004 13:31:29 -0500
Subject: RE: 1067 error when starting service after allocating more
memory to JVM

> From: Stephen Charles Huey []
> Subject: 1067 error when starting service after allocating more memory to JVM
> Hey, we've been running Tomcat 4.1.27 for a couple of years on our
> webserver, and we just upgraded the server from 2GB of memory to 3GB. 
> We've been allocating 1GB to the JVM when installing Tomcat as a
> service, but now we'd like to do 2GB, so I just changed the two
> instances of 1024 to 2048 in this:

The short answer is you can't do that.

The long answer is, as usual, a bit more complicated.  First, Windows
normally splits the 4GB virtual space into 2GB for each user process,
and 2GB for the operating system, shared across all processes.  There is
an option for Windows Server bootstrap to change this boundary to 3GB
for user processes and 1GB for the OS (sorry, I don't remember the tag).

Second, the virtual space that Windows gives each user process is
fragmented by DLLs scattered around in it, and the Sun JVM insists on
having one contiguous area for its heap (at least it did in 1.4.1; have
not verified this in 1.4.2).  This makes it difficult to get a whole lot
more than 1GB for the heap.

Third, there is (or possibly was) a bug in the JVM heap initialization
that failed to treat the specified sizes as unsigned, so 2GB and above
was treated as negative.  Lots of weird results from that.  Again, I
haven't looked in the 1.4.2 code, so this may have been fixed by now.

Your best bet is to do a binary search with -Xms/-Xmx and see what your
environment will handle.  You don't need to do this with Tomcat - just
specifying -version will suffice.  (Just make sure you put the heap
settings before -version, because anything on the command line after
-version is ignored.)

 - Chuck

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 unsubscribe, e-mail:
For additional commands, e-mail:

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

View raw message