rom-rb / rom

Data mapping and persistence toolkit for Ruby
https://rom-rb.org
MIT License
2.08k stars 161 forks source link

Running tests raises 'Too many open files - getcwd (Errno::EMFILE)' #630

Closed cllns closed 3 years ago

cllns commented 3 years ago

When running bundle exec rake (to run tests), I get Too many open files - getcwd (Errno::EMFILE).

Using macOS Catalina 10.15.7.

(I already found a solution for this. See below. Just opening this to help anyone else who might run into this problem, so it come up in a search.)

cllns commented 3 years ago

ulimit -n was returning 256. This the maximum number of files that can be opened. Running ulimit -n 1024 allows 1024 files, which is enough for the test suite.

You can put ulimit -n 1024 in your ~/.bashrc (or ~/.zshrc in my case) to set this configuration every time you open a new shell. Here's another, more involved solution, if that doesn't work for you for some reason. https://synthomat.de/blog/2020/01/increasing-the-file-descriptor-limit-on-macos/