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>
|
<dict>
|
||||||
<key>Label</key>
|
<key>Label</key>
|
||||||
<string>limit.maxfiles</string>
|
<string>limit.maxfiles</string>
|
||||||
<key>ProgramArguments</key>
|
<key>Program</key>
|
||||||
<array>
|
<string>/Users/runner/limit-maxfiles.sh</string>
|
||||||
<string>launchctl</string>
|
|
||||||
<string>limit</string>
|
|
||||||
<string>maxfiles</string>
|
|
||||||
<string>65536</string>
|
|
||||||
<string>524288</string>
|
|
||||||
</array>
|
|
||||||
<key>RunAtLoad</key>
|
<key>RunAtLoad</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>ServiceIPC</key>
|
<key>ServiceIPC</key>
|
||||||
@@ -28,6 +22,17 @@ cat > "${Launch_Daemons}/limit.maxfiles.plist" << EOF
|
|||||||
</plist>
|
</plist>
|
||||||
EOF
|
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"
|
echo "limit.maxfiles.plist permissions changing"
|
||||||
chown root:wheel "${Launch_Daemons}/limit.maxfiles.plist"
|
chown root:wheel "${Launch_Daemons}/limit.maxfiles.plist"
|
||||||
chmod 0644 "${Launch_Daemons}/limit.maxfiles.plist"
|
chmod 0644 "${Launch_Daemons}/limit.maxfiles.plist"
|
||||||
|
|||||||
Reference in New Issue
Block a user