rberger
November 29, 2021, 6:50am
1
Not sure if this is the right forum, but I’m trying to build react-status
on my local macOS Monterey environment. When I run make run-clojure
or make run-metro
I eventually get an error like:
error: opening directory '/nix/store/jp1qbzzwacb5i1wb59jg1x634842bach-regex-20.1.0.pom': Too many open files
Any idea how to get around this?, Thanks
jakubgs
November 29, 2021, 5:24pm
2
Yes, this can happen, in our CI we raise the file limits permanenty using Launchd jobs:
README.md
# How to Change Open Files Limit on OS X and macOS
_This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x_
_The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine
https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/_
## Mac OS X
### To check the current limits on your Mac OS X system, run:
This file has been truncated. show original
limit.maxfiles.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>limit.maxfiles</string>
<key>ProgramArguments</key>
<array>
<string>launchctl</string>
<string>limit</string>
This file has been truncated. show original
limit.maxproc.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>limit.maxproc</string>
<key>ProgramArguments</key>
<array>
<string>launchctl</string>
<string>limit</string>
This file has been truncated. show original
There are more than three files. show original
You can check your current limit with ulimit -n
. It is also possible to adjust the defaults for the system in /etc/sysctl.conf
. More reading: Maximum limits (in macOS file descriptors) – Index