Embedded Tomcat Java Heap Size

50 views
Skip to first unread message

Geng, Kelly

unread,
Jan 28, 2019, 11:27:44 AM1/28/19
to cas-...@apereo.org
Hello All,

Does anyone know how to adjust the Java heap size if you run the embedded tomcat for CAS5? We tried to update it in the build.cmd file in the overlay project, and tried to add -Xms and Xmx flags in the java command line, but none seems to take effect. 

Thanks!

--
Kelly

Mac Reid

unread,
Jan 28, 2019, 1:39:08 PM1/28/19
to cas-...@apereo.org
We use systemd to run our CAS service. Here's our configs for running CAS with a larger heap:

/etc/systemd/system/cas.service:
[Unit]
Description=CAS Webserver
After=syslog.target

[Service]
EnvironmentFile=/etc/sysconfig/cas
User=cas
ExecStart=/bin/java $JAVA_OPTS -jar /opt/cas/cas.war
SuccessExitStatus=143

[Install]
WantedBy=multi-user.target


/etc/sysonfig/cas:
JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms1g -Xmx6g -XX:-UseGCOverheadLimit -XX:+UseConcMarkSweepGC -XX:-UseCompressedOops"


I don't recall if the embedded tomcat uses the JAVA_OPTS environment variable or the command line flags.

-Mac

Geng, Kelly

unread,
Jan 28, 2019, 7:05:49 PM1/28/19
to cas-...@apereo.org
Thanks Mac! That's very helpful! 

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/CALX_e4%3DTxBun5wsVrDanqSViiqNMGrZbcAEf_BKyZwYdhOmvEw%40mail.gmail.com.


--
Kelly
Reply all
Reply to author
Forward
0 new messages