You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Karim Zaki <Ka...@itworx.com> on 2007/11/26 10:30:59 UTC

Passing JVM parameters through the GUI in Tomcat 5.0.28

Hi all,

I'm trying to pass some parameters to Tomcat 5.0.28. The product I'm installing (Vignette) explains how to do this when you run Tomcat using scripts:

set CATALINA_OPTS=-Xmx512M -Dcom.vignette.installDir="<vgn-install-dir>" -Dcom.vignette.workingDir="<vgn-working-dir>"

This works perfectly.

However, when I run Tomcat as a service, things start to break. It's my understanding that I can pass these parameters to Tomcat by putting them in the "Java Options" box in the "Java" tab of the Tomcat monitoring tool (while Xmx can be put in the appropriate text box at the bottom). However, when I do this the parameters do not get set and the application doesn't work. It clearly says that com.vignette.workingDir has not been properly set.

This is what my Java Options box looks like now:

-Dcatalina.base=C:\Tomcat
-Dcatalina.home=C:\Tomcat
-Djava.endorsed.dirs=C:\Tomcat\common\endorsed
-Djava.io.tmpdir=C:\Tomcat\temp
-Dcom.vignette.installDir=<vgn-install-dir>
-Dcom.vignette.workingDir=<vgn-working-dir>

I've also tried modifying the service creation script. This seems only to have added the parameters to the monitoring GUI.

Any ideas how I can make this work?

Thanks,
Karim



---------------------------------------------------------------------
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


RE: is there a limit to JAVA Heap size ?

Posted by "Baron, Bob (LNG-HBE)" <Bo...@lexisnexis.com>.
First of all, this is a JRE issue, not Tomcat!

Depending on your Operating system (Windows, *nix, etc.), whether it's a
32 or 64 bit version, and what JRE you're using, the limit is different.
You can get pretty good info from you JRE vendor about how it uses
memory - Sun has several good articles on it - especially how they
relate to Garbage Collection.

Under 32 bit Windows, the JRE process is limited to 2 GB of total memory
- including the memory that the JRE needs other than the heap controlled
by the -Xmx setting. 

The practical limit is about 1250 MB for 32-bit Windows with a 1.5 or
1.6 Sun JRE. The limit for 64-bit Windows is insanely high - I hope to
not ever reach it in my lifetime!

Whatever your environment, a little trial-and-error can be used. Simply
run something like 'java -Xmx2048M foo'. This is trying to set it to
2GB. Change the numeric value up and down to find out what your limit
is. The Sun JRE gives an error about allocating the memory before
worrying about not finding foo.

-----Original Message-----
From: mgainty@hotmail.com [mailto:mgainty@hotmail.com] 
Sent: Monday, November 26, 2007 12:12 PM
To: Tomcat Users List
Subject: Re: is there a limit to JAVA Heap size ?

Microsoft allows 3GB capability for User Process Address Space
http://www.microsoft.com/technet/sysinternals/information/bootini.mspx

Anyone else?
M--
----- Original Message ----- 
Wrom: UZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPB
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Monday, November 26, 2007 12:08 PM
Subject: Re: is there a limit to JAVA Heap size ?


> Jean,
> 
> I am not a Tomcat Expert, though I know you can set this value to a
> higher number. I have set once to 1GB.
> 
> Perhaps the gurus on the forum would answer it clearly to you.
> 
> HTH<
> 
> Bruno
> 
> On Nov 26, 2007 3:06 PM, Jean-Pierre Astier <jp...@janvier.fr>
wrote:
> > Hello,
> >
> > An other little question !!!
> >
> > Is there a limit to the java heap size var environment ?
> >
> > There is 3 GB off RAM on my server.
> >
> > I've set JAVA_OPTS to -Xms512m -Xmx512m in catalina.sh.
> >
> > Can I increase more than this value ?
> >
> > Thanks
> >
> >
---------------------------------------------------------------------
> > 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
> >
> >
> 
> ---------------------------------------------------------------------
> 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
> 
> 

---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


Re: is there a limit to JAVA Heap size ?

Posted by mg...@hotmail.com.
Microsoft allows 3GB capability for User Process Address Space
http://www.microsoft.com/technet/sysinternals/information/bootini.mspx

Anyone else?
M--
----- Original Message ----- 
Wrom: UZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPB
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Monday, November 26, 2007 12:08 PM
Subject: Re: is there a limit to JAVA Heap size ?


> Jean,
> 
> I am not a Tomcat Expert, though I know you can set this value to a
> higher number. I have set once to 1GB.
> 
> Perhaps the gurus on the forum would answer it clearly to you.
> 
> HTH<
> 
> Bruno
> 
> On Nov 26, 2007 3:06 PM, Jean-Pierre Astier <jp...@janvier.fr> wrote:
> > Hello,
> >
> > An other little question !!!
> >
> > Is there a limit to the java heap size var environment ?
> >
> > There is 3 GB off RAM on my server.
> >
> > I've set JAVA_OPTS to -Xms512m -Xmx512m in catalina.sh.
> >
> > Can I increase more than this value ?
> >
> > Thanks
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
> 
> ---------------------------------------------------------------------
> 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
> 
> 

---------------------------------------------------------------------
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


Re: is there a limit to JAVA Heap size ?

Posted by Bruno Vilardo <br...@gmail.com>.
Jean,

I am not a Tomcat Expert, though I know you can set this value to a
higher number. I have set once to 1GB.

Perhaps the gurus on the forum would answer it clearly to you.

HTH<

Bruno

On Nov 26, 2007 3:06 PM, Jean-Pierre Astier <jp...@janvier.fr> wrote:
> Hello,
>
> An other little question !!!
>
> Is there a limit to the java heap size var environment ?
>
> There is 3 GB off RAM on my server.
>
> I've set JAVA_OPTS to -Xms512m -Xmx512m in catalina.sh.
>
> Can I increase more than this value ?
>
> Thanks
>
> ---------------------------------------------------------------------
> 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
>
>

---------------------------------------------------------------------
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


is there a limit to JAVA Heap size ?

Posted by Jean-Pierre Astier <jp...@janvier.fr>.
Hello,

An other little question !!!

Is there a limit to the java heap size var environment ?

There is 3 GB off RAM on my server.

I've set JAVA_OPTS to -Xms512m -Xmx512m in catalina.sh.

Can I increase more than this value ?

Thanks

---------------------------------------------------------------------
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


Re: Increase JAVA Heap size when Tomcat start

Posted by Jean-Pierre Astier <jp...@janvier.fr>.
Thanks ben, all is ok now !!!!
jp

Le 26 nov. 07 à 16:58, ben short a écrit :

> Look at the catalina.bat or catalina.sh specifically at the JAVA_OPTS
> environment var
>
> On Nov 26, 2007 3:51 PM, Jean-Pierre Astier <jp...@janvier.fr>  
> wrote:
>> Hello all,
>>
>> I want to use a J2ee application (Magnolia), but I need to increase
>> the java heap size when tomcat (5.5.25) start.
>>
>> What is the solution ?
>>
>> Thanks
>>
>> Jean-Pierre
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>
> ---------------------------------------------------------------------
> 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
>
>


---------------------------------------------------------------------
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


Re: Increase JAVA Heap size when Tomcat start

Posted by ben short <ja...@gmail.com>.
Look at the catalina.bat or catalina.sh specifically at the JAVA_OPTS
environment var

On Nov 26, 2007 3:51 PM, Jean-Pierre Astier <jp...@janvier.fr> wrote:
> Hello all,
>
> I want to use a J2ee application (Magnolia), but I need to increase
> the java heap size when tomcat (5.5.25) start.
>
> What is the solution ?
>
> Thanks
>
> Jean-Pierre
>
> ---------------------------------------------------------------------
> 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
>
>

---------------------------------------------------------------------
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


Increase JAVA Heap size when Tomcat start

Posted by Jean-Pierre Astier <jp...@janvier.fr>.
Hello all,

I want to use a J2ee application (Magnolia), but I need to increase  
the java heap size when tomcat (5.5.25) start.

What is the solution ?

Thanks

Jean-Pierre

---------------------------------------------------------------------
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


RE: Passing JVM parameters through the GUI in Tomcat 5.0.28

Posted by Karim Zaki <Ka...@itworx.com>.
Hi Chuck,

Great idea! :) I changed the service to log on as a domain user and it worked. Thanks a million. I don't know how that could have slipped my mind.

Thanks again.

Karim

-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
Sent: Monday, November 26, 2007 6:14 PM
To: Tomcat Users List
Subject: RE: Passing JVM parameters through the GUI in Tomcat 5.0.28

> From: Karim Zaki [mailto:Karim.Zaki@itworx.com]
> Subject: RE: Passing JVM parameters through the GUI in Tomcat 5.0.28
>
> -Dcom.vignette.workingDir=\\vgn-cma-vm\Vignette\vcm\inst-shared

Try moving this to a local file and see if the problem disappears.  Also
try running this from a command prompt under a known account to see if
the UNC reference will work at all.  The account Tomcat is running under
as a service may not be able to establish the SMB connection to the
remote file system.

 - 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


---------------------------------------------------------------------
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


RE: Passing JVM parameters through the GUI in Tomcat 5.0.28

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Karim Zaki [mailto:Karim.Zaki@itworx.com] 
> Subject: RE: Passing JVM parameters through the GUI in Tomcat 5.0.28
> 
> -Dcom.vignette.workingDir=\\vgn-cma-vm\Vignette\vcm\inst-shared

Try moving this to a local file and see if the problem disappears.  Also
try running this from a command prompt under a known account to see if
the UNC reference will work at all.  The account Tomcat is running under
as a service may not be able to establish the SMB connection to the
remote file system.

 - 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


RE: Passing JVM parameters through the GUI in Tomcat 5.0.28

Posted by Karim Zaki <Ka...@itworx.com>.
Hi Chuck,

No. No angle brackets :)

Here are the actual parameters:

-Dcatalina.base=C:\Tomcat
-Dcatalina.home=C:\Tomcat
-Djava.endorsed.dirs=C:\Tomcat\common\endorsed
-Djava.io.tmpdir=C:\Tomcat\temp
-Dcom.vignette.installDir=C:\Vignette\Content\7_3_1
-Dcom.vignette.workingDir=\\vgn-cma-vm\Vignette\vcm\inst-shared

Thanks,
Karim


-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
Sent: Monday, November 26, 2007 5:40 PM
To: Tomcat Users List
Subject: RE: Passing JVM parameters through the GUI in Tomcat 5.0.28

> From: Karim Zaki [mailto:Karim.Zaki@itworx.com]
> Subject: Passing JVM parameters through the GUI in Tomcat 5.0.28
>
> -Dcom.vignette.installDir=<vgn-install-dir>
> -Dcom.vignette.workingDir=<vgn-working-dir>

You don't really have angle brackets in there, do you?  Show us your
real parameters.

 - 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


---------------------------------------------------------------------
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


RE: Passing JVM parameters through the GUI in Tomcat 5.0.28

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Karim Zaki [mailto:Karim.Zaki@itworx.com] 
> Subject: Passing JVM parameters through the GUI in Tomcat 5.0.28
> 
> -Dcom.vignette.installDir=<vgn-install-dir>
> -Dcom.vignette.workingDir=<vgn-working-dir>

You don't really have angle brackets in there, do you?  Show us your
real parameters.

 - 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