tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Info on PermSize and MaxPermSize
Date Fri, 16 Mar 2012 11:44:00 GMT
Geet Chandra wrote:
> On Fri, Mar 16, 2012 at 1:24 PM, André Warnier <aw@ice-sa.com> wrote:
> 
>> Geet Chandra wrote:
>> ...
>>
>> ...
>>
>>
>>
>>>>    Here is code snippet for registering as Windows service
>>> "%EXECUTABLE%" //IS//%SERVICE_NAME% --Install="C:\Program
>>> Files\<ProductName>\non<**Product>\tomcat\b\bin\tomcat6.**exe" --Jvm=auto
>>> --StartMode=jvm --StopMode=jvm
>>> --StartClass=org.apache.**catalina.startup.Bootstrap --StartParams=start
>>> --StopClass=org.apache.**catalina.startup.Bootstrap --StopParams=stop
>>> The above code snippet is run as *.bat and being invoked from *.msi
>>>
>>>  and
>>>>> command to start tomcat as "cmd.exe /c net start tomcat ".
>>>>>
>>>> - As utility.vbs is being included in tomcat package(*.msi) , once tomcat
>>>>  is installed on system, this utility.vbs is placed in
>>>> "C:\Program Files\<ProductName>\non<**Product>\tomcat\b\bin\"
folder.
>>>>
>>>   Here is snippet for utility.vbs as
>>>  - WSH_Shell.Run("cmd.exe /c net " & "stop"  &
>>> &chr(34)&Servicename&chr(34),**0,True)
>>>
>>>  So my question is there way to configure mentioned parameters before
>>> starting tomcat as Windows service.
>>>
>>>  Ok.
>> There are different Windows packages for tomcat, different ways to install
>> Tomcat under Windows, and different ways to run it.  And the answer to your
>> original question is different in each case. Previously, it was not clear
>> which way you were using.  Now it is.
>>
>> First, you should consult the Tomcat FAQ, in which there is a whole
>> section about running under Windows.  More specifically this article :
>> http://wiki.apache.org/tomcat/**FAQ/Windows#Q11<http://wiki.apache.org/tomcat/FAQ/Windows#Q11>
>> In that page is a link to the "procrun" software documentation, which you
>> should also read.
>>
>> This all explains what the above command
>>> "%EXECUTABLE%" //IS//%SERVICE_NAME% --Install="C:\Program .....
>> is, what it does, and how to set the appropriate parameters in the Windows
>> Registry to achieve what you want to do.
>>
>> Key points :
>> - the "-XX" command-line switches are command-line switches for the Java
>> JVM which runs tomcat
>> - the Windows Service runs the program tomcat(version).exe, which is a
>> wrapper
>> - the wrapper runs the JVM which runs tomcat
>> - the wrapper reads its parameters from the Windows Registry, including
>> the command-line switches that it should pass to the JVM when it starts it
>> - these Registry parameters are set by the above command
>> "%EXECUTABLE%" //IS//%SERVICE_NAME% --Install="C:\Program ....
>> when you use it to install the service
>>
>> If this is still not clear, come back here and ask away.
>>
> 
>    Could you please tell me how to set
> 
> -XX:MaxPermSize=96m  and -XX:PermSize=72m in Window Registry, when I start
> tomcat as window service, it should pass these value to JVM.
> 
> Can I execute the following command to register
> 
> "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions
> "-Djava.io.tmpdir=%CATALINA_BASE%\temp" --JvmMs 256 --JvmMx 512 -XX:MaxPermSize
> 96m -XX:PermSize=72m
> 
> 

See previous answers.  I think you should not use the --JvmMx and --JvmMs swicthes inside

the ++JvmOptions.  It is either one or the other.


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


Mime
View raw message