7.1.x inotify issues

231 views
Skip to first unread message

AJ

unread,
Jan 7, 2025, 11:02:58 PM1/7/25
to cas-...@apereo.org
When upgrading from 7.0.x to 7.1.x, we are seeing inotify usage increasing drastically.  This does not happen in 7.0.x (7.0.10). 
Running the below hovers around 25 for 7.0.x, but will keep increasing for 7.1.x (tried all version from 7.1.0 - 7.1.3).  

find /proc/*/fd -lname anon_inode:inotify 2>/dev/null | cut -d/ -f3 | xargs -I '{}' bash -c 'echo -n "{} "; ps -p {} -o comm= 2>/dev/null' | wc -l

I did not change any configuration between the versions.  We are using one groovy script in one of the services, it is a file based script, not inline.

Anyone see anything like this?  It seems to only happen under load, I can't reproduce it in my dev environment.

Thanks.
AJ

Andrew Tillinghast

unread,
Jan 8, 2025, 2:17:46 AM1/8/25
to CAS Community
Do you have custom groovy scripts?  I've seen this issue when it's scanning the scripts for changes. 

--
- Website: https://apereo.github.io/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 visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/MN6PR18MB546686ED4E427822773D3BDDDB112%40MN6PR18MB5466.namprd18.prod.outlook.com.

AJ

unread,
Jan 8, 2025, 6:26:06 AM1/8/25
to cas-...@apereo.org
Yes we have one script for one service that we use.  It does not happen in 7.0.x though. 

On Jan 8, 2025, at 2:17 AM, Andrew Tillinghast <atilli...@unicon.net> wrote:



Ray Bon

unread,
Jan 8, 2025, 5:54:38 PM1/8/25
to cas-...@apereo.org
AJ,

There is sometimes a note about increasing inotify with groovy scripts:

'In the event the configured resource is a Groovy script, specially if the script set to reload on changes, you may need to adjust the total number of inotify instances. On Linux, you may need to add the following line to /etc/sysctl.conf: fs.inotify.max_user_instances = 256'

My 7.1 is only in dev at the moment, so I have not experienced this.

Ray

AJ

unread,
Jan 8, 2025, 11:30:28 PM1/8/25
to cas-...@apereo.org, cas-...@apereo.org
Yes I did that and it does help, but at some point it will run out again.  It doesn’t seem to be cleaning up these resources.  Is there a way to turn off the file watching?  My groovy script doesn’t change.

On Jan 8, 2025, at 5:54 PM, Ray Bon <rb...@uvic.ca> wrote:



Andrew Tillinghast

unread,
Jan 8, 2025, 11:30:42 PM1/8/25
to CAS Community
I believe this is caused by a change in Java behavior not in CAS. Adding this setting to java_opts may help:  
-Dorg.apereo.cas.util.io.PathWatcherService=false

AJ

unread,
Jan 9, 2025, 8:33:19 AM1/9/25
to cas-...@apereo.org, Community CAS
Will try that and report back.  I did not change JVM versions though.

On Jan 8, 2025, at 11:30 PM, Andrew Tillinghast <atilli...@unicon.net> wrote:



Ray Bon

unread,
Jan 9, 2025, 5:30:12 PM1/9/25
to cas-...@apereo.org
Reply all
Reply to author
Forward
0 new messages