So, running 12.2, "routinely", recently, my IDE has been just seizing up
saying that it can not get exclusive access to a bunch of files (like my
.java files in my project).
The only recourse was a hard kill of the IDE, which loses any pending
changes.
Somehow, I don't recall how, I managed to see a mention about "too many
files" being accessed. Simply, the process had run out of slots for open
files.
It happened again and I managed to fire off "lsof -p <NBPID>" to get a list
of open files.
It returned a list of almost 13,000 (12,957 to be exact) entries.
After some digging around, over 12,000 of them were referring to
directories in my ~/.gradle directory.
To be honest, I didn't even know I had a .gradle directory.
I checked it, and I found only ("only") 2500ish files/directories
underneath .gradle.
Further study found things like this:
496
/Users/will/.gradle/caches/modules-2/files-2.1/org.openjfx/javafx-base/14
469
/Users/will/.gradle/caches/modules-2/files-2.1/org.openjfx/javafx-graphics/14
448
/Users/will/.gradle/caches/modules-2/files-2.1/org.openjfx/javafx-controls/14
260
/Users/will/.gradle/caches/modules-2/files-2.1/org.glassfish.jersey.media/jersey-media-json-jackson/2.30.1
259
/Users/will/.gradle/caches/modules-2/files-2.1/org.jboss.spec.javax.transaction/jboss-transaction-api_1.2_spec/1.1.1.Final
259
/Users/will/.gradle/caches/modules-2/files-2.1/org.jboss.logging/jboss-logging/3.3.2.Final
This says that I had the ...javafx-base/14 directory open 496 times.
Now, I don't use gradle. I did discover I had a gradle project I downloaded
opened in the IDE.
For the time being, I have renamed .gradle to .gradle.old, to hide it from
the IDE. I've reopened my IDE, and the gradle project is still open, but I
haven't tried to build it (I don't plan too), and the .gradle directory has
not reappeared. So, I will leave it linger for the time being.
I should note that when the IDE locked up, I had not (directly) accessed
the gradle projects,nor built them. The IDE may have dug these up during a
project scan, that's just a guess.
But curious if anyone else has encountered such a thing.
Regards,
Will Hartung