tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Flaherty <pflah...@rampageinc.com>
Subject Re: Setting initial memory for a Tomcat Windows Service
Date Thu, 13 Sep 2012 22:19:34 GMT

On Sep 13, 2012, at 5:37 PM, Christopher Schultz wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Patrick,
>
> On 9/13/12 11:41 AM, Patrick Flaherty wrote:
>> I'm trying to change the max memory (java heap -Xmx) using
>> Tomcat's //US// switch. I type it according to the Windows service
>> how-to. We would like to script this into our Tomcat deployment
>> script which right now simply installs the service using "service
>> install".
>>
>> With the service already installed I tried the following command
>> line options:
>>
>> tomcat7.exe //US//tomcat7 --JvmMs=512 --JvmMx=1024
>
> Hmm.
>
>> tomcat7.exe //US//tomcat7 --JvmOptions -Xms512m -Xmx1024m
>>
>> Although I get no error, I know its not taking because after
>> starting tomcat.exe I look in the Windows process manager and it
>> shows its only using 50MB of ram instead of 512MB of ram (the -Xms
>> value)
>
> Silly question: how do you start Tomcat? (tomcat.exe does not exist).

It's a Windows service. While testing this I'm just using the Services  
Control Manager to stop and start the service.
>
>> Any help would be greatly appreciated.
>
> You didn't follow the instructions for --JvmOptions:
> http://tomcat.eu.apache.org/tomcat-7.0-doc/windows-service-howto.html

I did follow the instructions. There are options for *just* min/max  
heap size (JvmMS & JvmMx)
>
> You want:
>
> - --JvmOptions -Xms=512#-Xmx=1024

No, this did not work.

>
> After you do either of your commands, what do you see if you do:
>
> C:\> tomcat7w.exe //ES//tomcat7

I'm just launching tomcat7w.exe in Windows and checking the Java tab  
to see if it took.

>
> That should show you the current configuration (and let you edit
> everything if you want).
>
> Remember that you are only editing the service definition: you will
> have to launch Tomcat via the service if you want that configuration
> to take effect. Also, if Tomcat is running when you change the
> configuration, you'll have to restart the service to notice any  
> change.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>
> iEYEARECAAYFAlBSUhAACgkQ9CaO5/Lv0PBzPgCePlVSr8zUutRBQleANxuTXNBw
> WFQAoK+cTorm2zEbfAdgnfgMzNz6ouWi
> =XEix
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


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


Mime
View raw message