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

> 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

You want:

- --JvmOptions -Xms=512#-Xmx=1024

After you do either of your commands, what do you see if you do:

C:\> tomcat7w.exe //ES//tomcat7

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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to