What settings must I change to allow Tomcat 8.5 more memory, in the range of 4 gigs, on the Oracle JDK for Java 8?
This has been asked before here. But that was marked (incorrectly) as a duplicate of this. The context for both Questions and their Answers was an older generation of Tomcat (version 7, versus contemporary 8.5), and an older generation of Java (Java 6 & Java 7 versus contemporary Java 8). So all the discussion was around PermGen which no longer exists in modern Java.
➠ What is the modern settings for giving Tomcat 8.5.x more memory on Java 8 Update 151 using the Java implementation provided by Oracle for macOS etc.?
If not specified, what is the minimum & maximum memory used by Tomcat?
Scraping together some info from various sources such as this RUNNING.txt document, I created a setenv.sh
file in the Tomcat bin
folder, with this line of text:
CATALINA_OPTS="-Xms4096m -Xmx4096m"
I expected that to immediately take 4 gigs of memory, but alas, no. On Mac OS X, I see the virtual memory for the java
process at 1.87 GB and the real memory at 1.39 GB.
So I am not sure what controls the min/max memory usage of Tomcat 8.5.23.