Increasing memory for Tomcat

J

Jim Cobban

I know that this question has been asked before and that the answer is to
set
-Xmxnnn.

The problem is to what do I set it. To increase the memory I have to know
what the value is if I do not set this value explicitly.

In any event every value I have tried so far causes the Catalina startup
window to issue a message and immediately close, so I have no idea what the
message is.

I didn't have a problem until I switched from JDK1.3.2 to JDK 1.4.2 as the
underlying environment. When I did Tomcat detected the change and started
doing a lot of things differently, including running out of memory.

--
Jim Cobban (e-mail address removed)
34 Palomino Dr.
Kanata, ON, CANADA
K2M 1M1
+1-613-592-9438
 
D

Darek

Jim Cobban said:
I know that this question has been asked before and that the answer is to
set
-Xmxnnn.

The problem is to what do I set it. To increase the memory I have to know
what the value is if I do not set this value explicitly.

In any event every value I have tried so far causes the Catalina startup
window to issue a message and immediately close, so I have no idea what the
message is.

I didn't have a problem until I switched from JDK1.3.2 to JDK 1.4.2 as the
underlying environment. When I did Tomcat detected the change and started
doing a lot of things differently, including running out of memory.

Are u sure you have problems with memory
If you want to change that value you should edit catalina.sh or
catalina.bat file and add -Xmxnnn in options for start argument, or
set environment variable
i.e CATALINA_OPTS

I used to have similar tomcat behaviour about starting up, and
immediately closing up, try to read logs, you can have problems with
some libraries, not with memory

Darek
 
W

William Brogden

Jim Cobban said:
I know that this question has been asked before and that the answer is to
set
-Xmxnnn.

The problem is to what do I set it. To increase the memory I have to know
what the value is if I do not set this value explicitly.

In any event every value I have tried so far causes the Catalina startup
window to issue a message and immediately close, so I have no idea what the
message is.

Obviously your first step should be to find out what the error is instead of
assuming it has to do with memory. In order to do that, you can change the
line in startup.bat (near the end) from
call "%EXECUTBLE%" start ....
to
call "%EXECUTABLE%" run ..
this will continue execution in the open window. You must run startup.bat
from a command line window, not by doubleclicking. You may also have
to REM out the @echo off at the start of catalina.bat

Bill
 
J

Jim Cobban

William Brogden said:
Obviously your first step should be to find out what the error is instead of
assuming it has to do with memory. In order to do that, you can change the
line in startup.bat (near the end) from
call "%EXECUTBLE%" start ....
to
call "%EXECUTABLE%" run ..
this will continue execution in the open window. You must run startup.bat
from a command line window, not by doubleclicking. You may also have
to REM out the @echo off at the start of catalina.bat

Thank you for explaining to me how to see the message.

The error is:
"Invalid initial heap size: -Xms6m -Xmx64m
Could not create the Java virtual machine."

As I originally indicated this still leaves me with the question: How do I
determine what the default value for -Xmx is? I can only increase it if I
know what the existing value is.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top