CAS v7.0.0 Performance issue.

412 views
Skip to first unread message

Shavi Teotia

unread,
Feb 23, 2024, 3:19:12 AM2/23/24
to CAS Community
I have recently updated the cas version on my application from 6.6.2 to 7.0.0.
There is some performance issue, that usually occurs when there is no load on the server.

My CPU utilization graph goes up till 98% and application goes down, start giving 503, we have to restart it or redeploy it.
We checked through the heap dump we found, the issue is related to the ConcurrentIndexedCollection, which is used for registered service indexing.

So my question is can we anyhow disable this or is there any other way to optimize, any specific property that needs to be declared.

Please let me know if any other information is also required.

Ray Bon

unread,
Feb 23, 2024, 9:14:24 AM2/23/24
to cas-...@apereo.org
Shavi,

Could this be related to the storage mechanism you use for services?
Are you able to try a different back end?

Ray

On Fri, 2024-02-23 at 00:09 -0800, Shavi Teotia wrote:
Notice: This message was sent from outside the University of Victoria email system. Please be cautious with links and sensitive information.

Shavi Teotia

unread,
Feb 23, 2024, 9:59:54 AM2/23/24
to CAS Community, Ray Bon
Hi Ray and Team,

We have an enterprise application, cannot change the backend. But Could you please suggest what would be the impact if the indexing is stopped from this piece of code.

Another point we are using hazelcast registry, is there any specific setting  or property that needs to be done in that case.


Łukasz Woźniak

unread,
Feb 23, 2024, 2:12:43 PM2/23/24
to cas-...@apereo.org
Same happend to Us. We have CAS on AWS in kubernetes. We have git for services and redis for tickets and mfa. We have 2 pod running with Horizontal Pod Autoscaling enabled. Autoscale never grow higher than 3 pods.

When we deploy CAS from version 6.5 to 7.0, CPU is always almost 100%. HPA scaled the app to 15 pods (max).

When I debug the App, I think CAS on 7.0 uses Virtual Thread from Java 21 and not all library is ready for that. 

 Is IT possibile to turn this off ?

Lukas


--
- 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/6a7653e9-ca89-4e20-84e2-8fa5476e6765n%40apereo.org.

Fatih Deniz

unread,
Feb 23, 2024, 2:28:38 PM2/23/24
to cas-...@apereo.org
Please check the indexes, we have had similar issues with CAS 6.6.10 , find operation was with ticket id and no index was created for it causing full collection scan in mongo db. No idea if it was fixed or not with the newer version.

Shavi Teotia

unread,
Feb 27, 2024, 4:54:01 AM2/27/24
to CAS Community, Shavi Teotia, Ray Bon
Hi Ray and team,
 Could you please help we are stuck at this point. Its been long we are trying to resolve this.

Ray Bon

unread,
Feb 27, 2024, 1:57:39 PM2/27/24
to cas-...@apereo.org, shavi....@gmail.com
Shavi,

Hazelcast is not listed as a storage option for services; ConcurrentIndexedCollection is related to service storage.
What do you use for storing services?
Have you tried increasing memory used by the application container?

Ray

Łukasz Woźniak

unread,
Feb 27, 2024, 3:10:52 PM2/27/24
to cas-...@apereo.org, shavi....@gmail.com
What protocol do you use ? Do You use OAuth? In my situation, I found that on the OAuth there is a bug in 7.0.0. CAS filter out scopes not mentioned in properties for OIDC( it shouldn't be like that). So application connecting with OAuth was doing Ddos, because It get empty scopes.

I know It is not related, but maybe It help.
Prometheus metrics help a lot.

--
- 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.

Fatih Deniz

unread,
Feb 27, 2024, 4:02:25 PM2/27/24
to cas-...@apereo.org
This we just experienced that uses OAuth protocol during a relatively high load scenario, would you be able to give more insights to this issue? What are some quick fix options available if you know any?

Łukasz Woźniak

unread,
Mar 1, 2024, 7:35:53 PM3/1/24
to cas-...@apereo.org
When You hit for accessToken CAS filterout claims that are diffrent than declared for OIDC. This happened here org/apereo/cas/support/oauth/web/DefaultOAuth20RequestParameterResolver.java:169 It shouldn't be like that for OAuth
For now, We override this class, and when someone ask for accessToken with own claims we do not remove them.

Pablo Vidaurri

unread,
Mar 4, 2024, 10:41:22 PM3/4/24
to CAS Community, Łukasz Woźniak
Interesting that you bring up VT with JDK21. There are many articles out there about issues with VT JDK21with pinning issues:

Shavi Teotia

unread,
Mar 19, 2024, 4:01:56 AM3/19/24
to CAS Community, mm1...@gmail.com

Hi Misagh and team,
I have recently updated the cas version on my application from 6.6.2 to 7.0.0.
There is some performance issue, that usually occurs when there is no load on the server.

My CPU utilization graph goes up till 98% and application goes down, start giving 503, we have to restart it or redeploy it.
We checked through the heap dump we found, the issue is related to the ConcurrentIndexedCollection, which is used for registered service indexing.

Now as per the further analysis we saw a commit where use of ConcurrentIndexedCollection is being restricted with a use of property, which is part of this commit: 

Could you please let us know if this commit could be released in the v7.0.3 or any other interim release.

Currently we are stuck as this is regularly throwing outOfMemory error.

Thanks and Regards
Shavi Teotia
 

Reply all
Reply to author
Forward
0 new messages