Increasing memory for Tomcat

Jim Cobban

Usenet Archive
Joined
Sep 4, 2002
Messages
45
Reaction score
0
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.
 

Darek

Usenet Archive
Joined
Nov 4, 2003
Messages
6
Reaction score
0
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
 

William Brogden

Usenet Archive
Joined
Jan 31, 2000
Messages
238
Reaction score
0
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
 

Jim Cobban

Usenet Archive
Joined
Sep 4, 2002
Messages
45
Reaction score
0
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
548,049
Messages
3,104,243
Members
248,133
Latest member
DujonT

Latest Threads

Top