Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 63B4410BF5 for ; Tue, 28 Jan 2014 09:01:15 +0000 (UTC) Received: (qmail 21109 invoked by uid 500); 28 Jan 2014 09:01:11 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 21058 invoked by uid 500); 28 Jan 2014 09:01:10 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 21049 invoked by uid 99); 28 Jan 2014 09:01:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 09:01:09 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of setevoy4@gmail.com designates 209.85.219.51 as permitted sender) Received: from [209.85.219.51] (HELO mail-oa0-f51.google.com) (209.85.219.51) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 09:01:03 +0000 Received: by mail-oa0-f51.google.com with SMTP id h16so97358oag.38 for ; Tue, 28 Jan 2014 01:00:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=2Ukuge7bVQpXIzdp9yD93Spv1kCUtVEmcddgLe/S8F4=; b=wL3u7kIg8UscChfhf1IHOvS3mEoCAgVrfgcBMzop+7myQ57QK0HPuS2lfXVTPGXziZ 9bNdVeOk2GGpLkUDEDjGoHnhtB6jSW09RGrvmund2hcF8hShmInlhpRERsEkJueD5Aye vvpbleqh4nL7maT/URKoxGfOIYu97pBndZZQ/bsgLDnMSb7SBVpEOIxYhErTnQV4+/C0 uJ+yffrIvibSW+KiVMqedjJANw1+9i1l8Gc2t/pJox1LMuwoOB/KIeLIQ0Dn7Uv3neBv AWXZ6YfDWV4ZUzSckI8VpslfQeEtTFbF4q9n7/FEuzlhlTR3pltl3t6tCniGgaqUzKYe vAYQ== MIME-Version: 1.0 X-Received: by 10.60.103.71 with SMTP id fu7mr205912oeb.48.1390899642337; Tue, 28 Jan 2014 01:00:42 -0800 (PST) Received: by 10.182.1.102 with HTTP; Tue, 28 Jan 2014 01:00:42 -0800 (PST) In-Reply-To: <52E76E9E.2050906@ice-sa.com> References: <52E67F59.5050206@christopherschultz.net> <52E682D2.40202@christopherschultz.net> <52E76E9E.2050906@ice-sa.com> Date: Tue, 28 Jan 2014 11:00:42 +0200 Message-ID: Subject: Re: JAVA_OPTS vs CATALINA_OPTS From: =?UTF-8?B?0JDRgNGB0LXQvdC40Lkg0JfQuNC90YfQtdC90LrQvg==?= To: Tomcat Users List Content-Type: multipart/alternative; boundary=089e0116059c198d0404f1040f50 X-Virus-Checked: Checked by ClamAV on apache.org --089e0116059c198d0404f1040f50 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable A lot of thanks, Neven! This is perfect explanation - considering my English :-) About point 4 - this is main goal: as we have few Java-applications running in this very system - they must use "global" memory options, thats why I suggested set System variable JAVA_OPTS. But namely Tomcat - must use another memory perametrs. So, if I correctly understood - for me better solution will be: 1) set CATALINA_OPTS with Xmx4G etc - in /bin/setenv.bat; 2) set JAVA_OPTS with Xmx1G etc - as system variable. Yep? 2014/1/28 Andr=C3=A9 Warnier > =D0=90=D1=80=D1=81=D0=B5=D0=BD=D0=B8=D0=B9 =D0=97=D0=B8=D0=BD=D1=87=D0=B5= =D0=BD=D0=BA=D0=BE 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 (an= d > 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 =3D 8 GB of Heap) > > - if you use CATALINA_OPTS to indicate a Heap of 4 GB, then this Heap wil= l > 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-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --089e0116059c198d0404f1040f50--