While on the subject of CATALINA_OPTS.  In 9.0.46, the catalina.sh script 
displays these when it runs.  I have several options in the CATALINA_OPTS, 
which makes this pretty long.
I don't remember it being this way in the past.  I would imagine that if this 
was changed to be like this, there was a good reason, but it makes my startup 
process look broken.  Would having this go to the catalina.out file be a good 
solution?  Or it is critical for others that it is output to stdout?

If this is critical, should JAVA_OPTS also be displayed to stdout?
-----
(
In the setenv.sh file, we use enough options that we use line continuation to 
make the file more readable which makes the CATALINA_OPTS line less readable 
because of the whitespace.
        -Xms128M \
        -Xmx512M \
        ...
)

Mark Claassen
Senior Software Engineer

Donnell Systems, Inc.
130 South Main Street
Leighton Plaza Suite 375
South Bend, INĀ  46601
E-mail: mailto:mclaas...@ocie.net
Voice: (574)232-3784
Fax: (574)232-4014

Disclaimer:
The opinions provided herein do not necessarily state or reflect 
those of Donnell Systems, Inc.(DSI). DSI makes no warranty for and 
assumes no legal liability or responsibility for the posting. 
-----Original Message-----
From: Noelette Stout <noelettest...@isu.edu> 
Sent: Wednesday, June 16, 2021 1:47 PM
To: Tomcat Users List <users@tomcat.apache.org>
Subject: [Possible Spam] Re: CATALINA_OPTS vs JAVA_OPTS
Importance: Low

Thanks! That clears things up a lot. I think my admins got confused and did 
both because there are some instructions that say to add these in JAVA_OPTS, 
but those instructions are specifically for Windows servers (we're on RHEL).

Thanks everyone for all the info and help.

On Wed, Jun 16, 2021 at 11:42 AM Mark Thomas <ma...@apache.org> wrote:

> On 16/06/2021 18:31, Noelette Stout wrote:
> > ok, one more question for clarification :-) The vendor docs say 
> > this:
> > "Define CATALINA_OPTS to configure the following JVM settings:
> > CATALINA_OPTS=-server -Xms2048m -Xmx4g -XX:MaxMetaspaceSize=512m 
> > Note:If you are deploying multiple [vendor] applications to the same
> Tomcat
> > server, -Xmx must be increased by 2g and -XX:MaxMetaspaceSize must 
> > be increased by 128m."
> >
> > Given that they are (ostensibly, based on the above statement) JVM 
> > settings, would these settings be better placed under JAVA_OPTS 
> > instead
> of
> > CATALINA_OPTS?
>
> No. CATALINA_OPTS.
>
> 99 times out of a 100 you want to put any JVM settings in CATALINA_OPTS.
>
> Mark
>
> >
> >
> > On Wed, Jun 16, 2021 at 10:29 AM Noelette Stout 
> > <noelettest...@isu.edu>
> > wrote:
> >
> >> This confirms something that I was thinking originally, which is 
> >> that we have no good reason to have both in setenv.sh. I'm pretty 
> >> sure that
> these
> >> were both mentioned in various pieces of documentation from the
> application
> >> vendor. Their documentation tends to be less than stellar. Combine 
> >> bad documentation with app admins that are completely unfamiliar 
> >> with
> tomcat...
> >> and you get messy setups. Unfortunately, there are more of them 
> >> than
> me, so
> >> I have to have ALL of my facts straight before I go into battle.
> >>
> >> Thanks for this additional information. It is much appreciated.
> >>
> >> On Wed, Jun 16, 2021 at 10:14 AM Christopher Schultz < 
> >> ch...@christopherschultz.net> wrote:
> >>
> >>> Noelette,
> >>>
> >>> On 6/16/21 11:29, Noelette Stout wrote:
> >>>> Thanks! I was mostly trying to figure out if there was precedence 
> >>>> or
> if
> >>> it
> >>>> was additive (i.e. 2GB to tomcat itself and another 2GB to the apps).
> >>> We're
> >>>> having some resource issues on one of our servers, so I wanted to 
> >>>> make
> >>> sure
> >>>> I understood how the resources were being allocated.
> >>>
> >>> No additivity at all: the last one on the command-line wins. There 
> >>> is
> no
> >>> heap separation between Tomcat and the applications: it's one(ish) 
> >>> big, happy heap. :)
> >>>
> >>> A note about CATALINA_OPTS versus JAVA_OPTS: when you use the 
> >>> various scripts provided by Tomcat, CATALINA_OPTS is only used 
> >>> when launching a Tomcat instance. JAVA_OPTS is used when launching *any* 
> >>> Java process.
> >>> There are many Java processes those scripts will launch that 
> >>> aren't actually launching Tomcat. Examples include:
> >>>
> >>> 1. catalina.sh configtest
> >>> 2. catalina.sh stop (also shutdown.sh) 3. catalina.sh version 4. 
> >>> tool-wrapper.sh [anything]
> >>>
> >>> In all of those cases, JAVA_OPTS will be passed to the JVM.
> >>>
> >>> Do you really need a 2 gig heap to send a "shutdown" command to a 
> >>> running server? Probably not.
> >>>
> >>> -chris
> >>>
> >>>> On Wed, Jun 16, 2021 at 9:17 AM Rob Sargent 
> >>>> <rsarg...@xmission.com>
> >>> wrote:
> >>>>
> >>>>>
> >>>>>
> >>>>> On 6/16/21 9:06 AM, Noelette Stout wrote:
> >>>>>> openjdk version "1.8.0_292"
> >>>>>>
> >>>>>>
> >>>>>> On Wed, Jun 16, 2021 at 9:04 AM Rob Sargent 
> >>>>>> <rsarg...@xmission.com>
> >>>>> wrote:
> >>>>>>
> >>>>>>
> >>>>> Both as for the same minimum so you should get 2G at start up.  
> >>>>> I'm
> not
> >>>>> sure which has precedency but I would be on java opt.  I don't 
> >>>>> have a catalina env, but you can see how CATALINA_OPTS is used 
> >>>>> in
> relationship
> >>>>> with JAVA_OPTS
> >>>>>
> >>>>>
> >>>>> ----------------------------------------------------------------
> >>>>> ----- To unsubscribe, e-mail: 
> >>>>> users-unsubscr...@tomcat.apache.org
> >>>>> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>>>>
> >>>>>
> >>>>
> >>>
> >>> ------------------------------------------------------------------
> >>> --- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >>> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>>
> >>>
> >>
> >> --
> >> Noelette Stout
> >>
> >> ITS Enterprise Applications - Application Administrator - Senior
> >>
> >> Business Administration Building, Rm 109L
> >> 921 South 8th Ave 8037
> >> Idaho State University
> >> Pocatello ID 83209
> >> E-mail: stounoel "at" isu "dot" edu
> >> Desk: 208-282-2554
> >>
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

--
Noelette Stout

ITS Enterprise Applications - Application Administrator - Senior

Business Administration Building, Rm 109L
921 South 8th Ave 8037
Idaho State University
Pocatello ID 83209
E-mail: stounoel "at" isu "dot" edu
Desk: 208-282-2554

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

Reply via email to