|
From: Leif M. <lei...@ta...> - 2012-10-22 07:44:54
|
Michael, There are a number of ways to pass values into the Wrapper to do what you want. The method you use will depend on the circumstances under which you will be changing the memory size settings. 1) Environment variables. http://wrapper.tanukisoftware.com/doc/english/props-envvars.html It is possible to reference any environment variable from within your wrapper.conf file. These values of course will only work when the environment is loaded. This means that if you change the environment (SYSTEM in most cases) you will need to restart the Wrapper service itself for the changes to take affect. If you use environment variables, you do so as follows: Environment: --- JAVA_MAX_MEMORY=256 --- wrapper.conf: --- wrapper.java.additional.2=-Xmx%JAVA_MAX_MEMORY%m --- 2) Command line. http://wrapper.tanukisoftware.com/doc/english/props-command-line.html When you install the Wrapper as a service, it is possible to specify any wrapper property on its command line. This method can only be used when either installing as a service, or updating the Service configuration. The install command would look like this: --- wrapper.exe -i ..\conf\wrapper.conf wrapper.java.additional.2=-Xmx64m --- 3) Cascading Configuration Files. http://wrapper.tanukisoftware.com/doc/english/props-cascading.html It is possible to dynamically create a small configuration file which only contains the properties that you want to change, and then include that from your main configuration file. This method will work if you restart the Wrapper, or even just the JVM if you have the wrapper.restart.reload_configuration=TRUE property set. http://wrapper.tanukisoftware.com/doc/english/prop-restart-reload-configuration.html Please let me know if you have any questions about any of these. Cheers, Leif On Sun, Oct 21, 2012 at 11:27 PM, Michael MacFaden <mr...@vm...> wrote: > >From: Leif Mortensom > >If you require more complicated memory configurations, this can be done > >using the wrapper.java.additional.<n> properties as follows: > > > >wrapper.java.additional.1=-Xms3m > >wrapper.java.additional.2=-Xmx64m > > > >Additional memory settings can be added as needed. When you are done, I > >recommend setting the following property the first time you launch the JVM > >so you can double check the command line. > >wrapper.java.command.loglevel=INFO > > > >Please let me know if you have any questions getting up and running. > > Thanks for the response Leif. Guess I wasn't clear either, in our > system the memory size values are dynamic, may change each time the > jvm is started. I didn't want to modify the wrapper.conf each time > the app starts so wanted to know if I could pass the values in > to tanuki via env var or cmd line. > > Mike > |