You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kevin Baynes <kb...@seagullsw.com> on 2003/04/23 20:36:51 UTC

passing args to java

I have a Web application that is throwing OutOfMemoryError. I'm trying to
increase the initial and maximum heap sizes allocated to the JVM at startup.
Tomcat is running as an NT service.

I have tried setting the CATALINA_OPTS environment variable and restarting
the service. I have set the variable to '-server -Xms256m -Xmx512m' and to
'-Xms256m -Xmx512m'. I then checked the memory from within the Java
application using 'Runtime.getRuntime().totalMemory()' and
'Runtime.getRuntime().maxMemory()', but the values are not varying much from
the default 64MB and 128MB, respective. It looks to me that modifying
CATALINA_OPTS is not working.

Can anyone advise how to modify initial and max heap size of JVM for Tomcat
running as a service?

Thanks!

~akb


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: passing args to java

Posted by "Jaber C. Mourad" <mj...@centralpay.net>.
I have the same pb but under linux...
I have already post this question but no answers.....
Any body's got an idea ?
Thanks

Mourad

Le mer 23/04/2003 à 20:49, Andre E. Bar'yudin a écrit :
> Квотироние Kevin Baynes <kb...@seagullsw.com>:
> 
> > 
> > I have a Web application that is throwing OutOfMemoryError. I'm trying to
> > increase the initial and maximum heap sizes allocated to the JVM at startup.
> > Tomcat is running as an NT service.
> > 
> > I have tried setting the CATALINA_OPTS environment variable and restarting
> > the service. I have set the variable to '-server -Xms256m -Xmx512m' and to
> > '-Xms256m -Xmx512m'. I then checked the memory from within the Java
> > application using 'Runtime.getRuntime().totalMemory()' and
> > 'Runtime.getRuntime().maxMemory()', but the values are not varying much from
> > the default 64MB and 128MB, respective. It looks to me that modifying
> > CATALINA_OPTS is not working.
> 
> I doubt that when Tomcat runs as NT service it consults the scripts in the bin
> directory (as opposed to Unix).  You can try the following to change JVM
> parameters for Tomcat, downloaded from the Jakarta web site:
> 
> 1. Open your Windows registry (in regedit or whatever).
> 2. Locate the key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache
> Tomcat 4.1\Parameters" (substitute the real name of your Tomcat service)
> 3. Examine it - it should be quite straightforward how to add a new argument. 
> Don't forget to update the "JVM Option Count".
> 
> Regards,
> 
> Andre.
-- 
Jaber C. Mourad <mj...@centralpay.net>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: passing args to java

Posted by "Andre E. Bar'yudin" <ba...@pob.huji.ac.il>.
Квотироние Kevin Baynes <kb...@seagullsw.com>:

> 
> I have a Web application that is throwing OutOfMemoryError. I'm trying to
> increase the initial and maximum heap sizes allocated to the JVM at startup.
> Tomcat is running as an NT service.
> 
> I have tried setting the CATALINA_OPTS environment variable and restarting
> the service. I have set the variable to '-server -Xms256m -Xmx512m' and to
> '-Xms256m -Xmx512m'. I then checked the memory from within the Java
> application using 'Runtime.getRuntime().totalMemory()' and
> 'Runtime.getRuntime().maxMemory()', but the values are not varying much from
> the default 64MB and 128MB, respective. It looks to me that modifying
> CATALINA_OPTS is not working.

I doubt that when Tomcat runs as NT service it consults the scripts in the bin
directory (as opposed to Unix).  You can try the following to change JVM
parameters for Tomcat, downloaded from the Jakarta web site:

1. Open your Windows registry (in regedit or whatever).
2. Locate the key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache
Tomcat 4.1\Parameters" (substitute the real name of your Tomcat service)
3. Examine it - it should be quite straightforward how to add a new argument. 
Don't forget to update the "JVM Option Count".

Regards,

Andre.

-- 
=============================================================
Andre E. Bar'yudin
Home page:  http://www.cs.huji.ac.il/~baryudin/


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org