Арсений Зинченко wrote:
OK, thanks - I'll do it from now (really - never used this file before,
just now found reference to it in catalina.bat) . But - last question,
please: in setenv.bat - must be used CATALINA_OPTS or JAVA_OPTS?


Ok, let us be really clear here.

1) The command to *stop* Tomcat starts *another* instance of Java JVM (and Tomcat), *just* to send a stop signal to the running Tomcat. And after that, this second instance of Java and Tomcat exits.

2) Options given in JAVA_OPTS are used in *both* the command to start and to 
stop Tomcat.
Options given in CATALINA_OPTS are used *only* in the command that starts Tomcat, and not in the command that stops Tomcat.
In other words :
- startup.(bat|sh) : java %JAVA_OPTS% %CATALINA_OPTS% tomcat-stuff
- shutdown.(bat|sh) : java %JAVA_OPTS% tomcat-stuff

That is just the way that these command files are written.

3) So,
- if you use JAVA_OPTS to indicate a Heap of 4 GB, then this Heap of 4 GB will 
be allocated :
  - for the JVM instance that starts and runs Tomcat (which is what you want)
- but *also* for the JVM instance that stops Tomcat (which you probably do not want, just to send a stop signal)(because then, just for a short moment, you need 4 + 4 = 8 GB of Heap)

- if you use CATALINA_OPTS to indicate a Heap of 4 GB, then this Heap will be 
allocated
- *only* for the JVM instance which starts and runs Tomcat
- and *not* for JVM instance that stops Tomcat (that one will use a minimal Heap, so the total would be only 4 + 0.1 GB)

4) and if you make either one of the above be a general "system variable", then they will be used by *any* Java JVM that you start on that system. This is probably not what you want either, so don't do that.




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

Reply via email to