mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
[macOS] Fix open file limits (#8187)
This commit is contained in:
@@ -12,14 +12,8 @@ cat > "${Launch_Daemons}/limit.maxfiles.plist" << EOF
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>limit.maxfiles</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>launchctl</string>
|
||||
<string>limit</string>
|
||||
<string>maxfiles</string>
|
||||
<string>65536</string>
|
||||
<string>524288</string>
|
||||
</array>
|
||||
<key>Program</key>
|
||||
<string>/Users/runner/limit-maxfiles.sh</string>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>ServiceIPC</key>
|
||||
@@ -28,6 +22,17 @@ cat > "${Launch_Daemons}/limit.maxfiles.plist" << EOF
|
||||
</plist>
|
||||
EOF
|
||||
|
||||
# Creating script for applying workaround https://developer.apple.com/forums/thread/735798
|
||||
|
||||
cat > "/Users/runner/limit-maxfiles.sh" << EOF
|
||||
#!/bin/bash
|
||||
sudo launchctl limit maxfiles 256 unlimited
|
||||
sudo launchctl limit maxfiles 65536 524288
|
||||
EOF
|
||||
|
||||
echo "limit.maxfiles.sh permissions changing"
|
||||
chmod +x "/Users/runner/limit-maxfiles.sh"
|
||||
|
||||
echo "limit.maxfiles.plist permissions changing"
|
||||
chown root:wheel "${Launch_Daemons}/limit.maxfiles.plist"
|
||||
chmod 0644 "${Launch_Daemons}/limit.maxfiles.plist"
|
||||
|
||||
Reference in New Issue
Block a user