[MAGNOLIA-2404] Add a line in catalina.sh to display the heap-settings on Magnolia startup Created: 02/Feb/08  Updated: 01/Oct/08  Resolved: 25/Mar/08

Status: Closed
Project: Magnolia
Component/s: build
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Trivial
Reporter: Giancarlo Berner Assignee: Magnolia International
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Magnolia EE 3.5.4, Tomcat 5.5


Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

Magnolia requires a lot of heap (depending on persistence manager and version settings too) and so the "Out Of Memory" error occurs every once and then.

Since magnolia_control.sh by default sets the "CATALINA_OPTS" properties, why not display them on startup of Magnolia?
magnolia_control.sh calls startup.sh which launches catalina.sh.

I suggest that we add the line
echo "Using CATALINA_OPTS: $CATALINA_OPTS"
to the "Execute The Requested Command". The section will look like follows:

  1. ----- Execute The Requested Command -----------------------------------------
  1. Bugzilla 37848: only output this if we have a TTY
    if [ $have_tty -eq 1 ]; then
    echo "Using CATALINA_BASE: $CATALINA_BASE"
    echo "Using CATALINA_HOME: $CATALINA_HOME"
    echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
    if [ "$1" = "debug" -o "$1" = "javac" ] ; then
    echo "Using JAVA_HOME: $JAVA_HOME"
    else
    echo "Using JRE_HOME: $JRE_HOME"
    fi
    echo "Using CATALINA_OPTS: $CATALINA_OPTS"
    fi

This will extend the output to show something like this:

Using CATALINA_BASE: /Applications/Mg354/apache-tomcat-5.5.25
Using CATALINA_HOME: /Applications/Mg354/apache-tomcat-5.5.25
Using CATALINA_TMPDIR: /Applications/Mg354/apache-tomcat-5.5.25/temp
Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
Using CATALINA_OPTS: -Xms512M -Xmx1024M -Djava.awt.headless=true

allowing to easily see what additional options, like e.g. Heap, has been set.



 Comments   
Comment by Magnolia International [ 25/Mar/08 ]

Outdated.
We introduced the magnolia_control.(sh|bat) scripts for this to avoid having to maintain copies of the tomcat scripts.
Settings should be set there or in the set_env.(sh|bat) scripts.

Generated at Mon Feb 12 03:36:23 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.