I turned off systemd for tomcat: 84$ sudo systemctl disable tomcat [sudo] password: Removed symlink /etc/systemd/system/multi-user.target.wants/tomcat.service.
Verified the setenv.sh file: 93$ ls -l /usr/share/tomcat/bin/setenv.sh -rw-rw-r--. 1 root tomcat 110 May 11 12:56 /usr/share/tomcat/bin/setenv.sh 94$ cat /usr/share/tomcat/bin/setenv.sh export CATALINA_OPTS="-server -Xms2048m -Xmx2048m" export JAVA_OPTS="-XX:PermSize=256m -XX:MaxPermSize=2048m" Restarted tomcat, and it still runs for about 2 minutes then throws that java.lang.OutOfMemoryError: Java heap space error and dies. On Tue, May 12, 2020 at 4:36 PM calder <calder....@gmail.com> wrote: > On Tue, May 12, 2020, 13:48 calder <calder....@gmail.com> wrote: > > > > > [ snip ] > > > > Does their Tomcat use Systemd? > > If yes, then look for the Systemd unit file - default should be > > /etc/systemd/system/tomcat.service > > .... that's where they will add an entry like (or modify the existing) > > [ ... ] > > Environment='CATALINA_OPTS=-server -Xms2048m -Xmx2048m > > -XX:PermSize=256m -XX:MaxPermSize=2048m' > > [ ... ] > > > My post may have been a bit misleading with my comment about setenv.sh and > then the reference to Systemd. If using Systemd, setenv.sh will be > ignored, hence the possible use of default JVM memory config, and thus > OOME. >