CAS Slow Load Time

73 views
Skip to first unread message

Trenton Adams

unread,
Apr 15, 2019, 1:25:57 PM4/15/19
to cas-...@apereo.org
So, with the features we're using, CAS 5.2.x, tomcat startup takes 4 minutes on a single core, and 1 minute on a quad core system.  So, every single change I make to the config takes a long time to try it out.

Why does it take so long?  It seems like maybe it's Spring Bloat, no?  I can't imagine a service like CAS taking that long to load.

Is there any way of making it not take that long?  e.g. Maybe I can somehow exclude a bunch of dependencies we don't need.

Thanks.

-- 
Trenton D. Adams
Senior Systems Analyst/Web Software Developer
Applications Unit - ITS
Navy Penguins at your service!
Athabasca University
:wq!


--
This communication is intended for the use of the recipient to whom it is addressed, and may contain confidential, personal, and or privileged information. Please contact us immediately if you are not the intended recipient of this communication, and do not copy, distribute, or take action relying on it. Any communications received in error, or subsequent reply, should be deleted or destroyed.
---

Ray Bon

unread,
Apr 15, 2019, 2:52:01 PM4/15/19
to cas-...@apereo.org
Trenton,

If you are using tomcat that you downloaded, it comes with a number of applications (docs, manager, etc.). You could delete those apps.

Ray
Message has been deleted

Andy Ng

unread,
Apr 15, 2019, 9:23:04 PM4/15/19
to CAS Community
Hi Tenton,

Also, some of the config can reload itself after you change it on the properties file instantly, so some time it is not necessary to redeploy the complete system.

Cheers!
- Andy

Trenton D. Adams

unread,
Apr 16, 2019, 2:48:50 PM4/16/19
to Igor Babalich, CAS Community

Tomcat starts up in about 5 seconds for our application which is 80,000 lines of code, but for CAS it takes a long time, so I can't imagine it's a tomcat issue.  Our health check shows tomcat is up in about 3 seconds or so, but the CAS context has no response for several minutes.

But, I'll take a look at the info you provided either way.

On 4/15/19 2:05 PM, Igor Babalich wrote:
Hi Trenton,

as recommended in the documentation for Servlet containers https://apereo.github.io/cas/5.3.x/installation/Configuring-Servlet-Container.html,
try to review  several recommendations on how to make web applications and Apache Tomcat as a whole to start up faster :   https://wiki.apache.org/tomcat/HowTo/FasterStartUp

Igor

---

This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary, confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify the sender and erase this e-mail message immediately.

Le présent courrier électronique (ainsi que les pièces qui y sont annexées, le cas échéant) s’adresse au destinataire indiqué et peut contenir des renseignements privilégiés, confidentiels et/ou dispensés de divulgation.  Si vous n’êtes pas le destinataire de ce document, nous vous signalons qu’il est strictement interdit de le diffuser, de le distribuer ou de le reproduire.  Si ce message vous a été transmis par erreur, veuillez en aviser l’expéditeur et le supprimer sans délai.
-- 
Trenton D. Adams
Senior Systems Analyst/Web Software Developer
Applications Unit - ITS
Athabasca University
(780) 675-6195

It is only when you are surrounded by a supportive team, that you can achieve 
your best.  Instead of tearing people down, try building them up!

Richard Frovarp

unread,
Apr 16, 2019, 4:23:49 PM4/16/19
to cas-...@apereo.org
CAS is a quite complicated system. I don't know how 5.2 works, but if you are running the management application in the same Tomcat on 5.3, that is what takes a long time to start. By default it is trying to pull data from the IdP to start. It not starting means that Tomcat isn't listening, so it can't retrieve the data from the IdP, preventing it from starting. That lasts until it times out, and it just starts. There's a config flag to stop that behavior.

The CAS logs have timestamps. They'll tell you what it is up to on startup. It's possible its timing out trying to connect to something else. Depending on your heap sizes, you could also have extra memory pressure. But the fact that you're saying it is taking minutes likely means that something is timing out when trying to connect to something on startup. The other thing I can think of would be your entropy source, no idea how heavily CAS leans on that for startup.
--
- 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/deca06e7-4993-a648-94e6-b77023e8ee1f%40athabascau.ca.


Tepe, Dirk

unread,
Apr 16, 2019, 4:52:19 PM4/16/19
to cas-...@apereo.org
CAS bootstraps a number of services and can be slow to reach an operational state. I ran into another situation which contributed to a very slow load time, but I don't if it would apply to you. We use local VMs with vagrant and VirtualBox for development. I found that when I ran a new WAR file from a location that was shared from my host filesystem into the VM, the load time was extremely slow. Simply copying the WAR to the local file system made a dramatic difference. Could your filesystem be something to look at?

-dirk

--
Reply all
Reply to author
Forward
0 new messages