-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Too many open files on Mac OS with JDK 11 and mvnd 0.8.2 #710
Comments
I ran into a similar issue when I tried to generate sources with a java program that loads a lot of jars itself. |
@mohnishkodnani shouldn't it be |
hello @ppalaga ! thank you for looking into this. |
I see two things to investigate:
|
@gnodet thank you for looking into this. |
Afaik, the JVM args problem has been fixed in #751 |
thank you @gnodet ! |
hello @gnodet ! do you know if the fix is available also in the version 0.9.0? thank you! |
The fix for the JVM args has been back ported with f2117cc |
thank you @gnodet ! It does not work or I was not able to make it work. last try it was with version 1.0-m6 |
hey @gnodet ! I am not able to replicate the problem with the following command mvnd -Dmvnd.jvmArgs=-XX:-MaxFDLimit clean install and the following configuration
maybe this can be rejected/closed now. thank you very much! |
I've spent far too much time in the last day looking into this. I think I know what is happening though. Graalvm doesn't support the Looking at the source code for graalvm: https://github.com/oracle/graal/ There isn't any real option for interacting with RLIMIT_NOFILE except in a weird corner case during PosixNativeLibrary initialization. |
Hey @telemenar in my case the problem is intermittent, so yes I think it has some limitation, not sure how/why or if it is really because of GraalVM/native-image handling of |
I would rule out GraalVM in this case. It's only the client which is compiled to native, and that one mostly communicate with the daemon, so I don't really see a reason why it would reach a limit, especially as it does after each build. |
We have a very large project and in our day to day development also when we upgraded from JDK8 to JDK11, when running regular maven builds we used to get
Too many open files
error. We circumvented this in 2 ways.-XX:-MaxFDLimit
under.mvn/jvm.config
Together after these 2 running
mvnw clean install -DskipTests -T16
worked fine as opposed to givingToo many open files
.The system is Apple M1 Max with JDK 11 and maven 3.8
We wanted to try maven daemon and we faced the same
Too many open files
issue when building our project. Doing lsof shows that it happens around 10k files ( since that is the JVM limit on Mac OS ) which is why-XX:-MaxFDLimit
was needed.We tried to create
.mvn/mvnd.properties
and putmvnd.jvmArgs=-XX:-MaxFDLimit
however we still get this error.On the shell we see that
ulimit -a
is set to the 10 million file value.We can also see in the command that runs the
-Dmvnd.jvmArgs
having the above value.Not sure if there is any steps that I could use to debug this issue.
Running
ps
on the maven daemon processyou can see that
-Dmvnd.jvmArgs=-XX:-MaxFDLimit
is read from.mvn/mvnd.properties
file.Version:
Ulimit on the shell:
The text was updated successfully, but these errors were encountered: