Closed fnunnari closed 5 years ago
I've experienced similar issues on Mac OSX. In general, it's a side-effect of the Gradle Worker API not releasing resources. Technically, one solution would be to reboot -- "solving the problem once and for all!"
Personally, I've raised the limits on my Macs, following guidelines such as this: https://www.macobserver.com/tips/deep-dive/evade-macos-many-open-files-error-pushing-limits/
But YMMV.
Solved via Terminal command lines.
Check your current limits:
launchctl limit maxfiles
Set the new limits:
sudo launchctl limit maxfiles 50000 200000
Then, no more Too many open files error.
Great!
For the record, this shouldn't normally happen -- it's a side-effect of the Gradle daemon crashing too many times without a reboot.
@psibre , you mentioned "it's a side-effect of the Gradle Worker API not releasing resources". What exactly did you mean with that? Like it's something known about the API? Or just like something that might happen because of buggy external code? If it's the first option, I'd be grateful for any pointer.
I'm asking because we are seeing gradle processes dying during our build because of "too many files open" in the latest Macbooks (bumping into the JVM max of 10240 files), while older Macbooks work correctly (~8k open files); and I'm trying to understand how can this happen.
(to be clear, with "our build" I meant another project, unrelated to marytts)
@hmijail First of all, I would ensure that you're using the latest version of Gradle. If problems persist on some Macs, but not others, and are also not reproducible on Linux systems, I would compare the launchctl limit maxfiles
settings for the different systems. Or whatever the current way of doing this on recent macOS versions is -- this discussion was related to issues on El Capitan.
Perfect! I got this often when using Netbeans/Intellj on Mac Big sur ARM M1. First, I even think that the error comes from Apple Silicon SoC. You saved my day. Thank you much indeed @fnunnari
I have a project with a custom build.gradle:
And I have a submodule for:
buildSrc gradle-marytts-voicebuilding-plugin [05ce486eed83]
Under
build
, I manually created and filled directoriestext
,wav_orig
, andlab
.When executing, the first time, I get an error about Could not resolve all dependencies for configuration On the second run, I get an error about Too many open files in system !!! Maybe too many parallel tests on the input files? But my training set has so far only 23 files.
System details: OS: MacOS 10.11.6 java version "1.8.0_192"
Output details.
After first run:
On the second run: