Skip to content

Commit 0097312

Browse files
authored
Merge pull request #23207 from irvifa/docs/add-readme-for-mac-openfiles-problems
docs: Add README to Solve Too Many Openfiles in MacOS
2 parents c69afa2 + 10cb584 commit 0097312

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

README.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,43 @@ make serve
5858

5959
This will start the local Hugo server on port 1313. Open up your browser to http://localhost:1313 to view the website. As you make changes to the source files, Hugo updates the website and forces a browser refresh.
6060

61+
### Troubleshooting MacOS for too many open files
62+
63+
If you run `make serve` on MacOS and receive the following error:
64+
65+
```
66+
ERROR 2020/08/01 19:09:18 Error: listen tcp 127.0.0.1:1313: socket: too many open files
67+
make: *** [serve] Error 1
68+
```
69+
70+
Try checking the current limit for open files:
71+
72+
`launchctl limit maxfiles`
73+
74+
Then run the following commands:
75+
76+
```
77+
#!/bin/sh
78+
79+
# These are the original gist links, linking to my gists now.
80+
# curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxfiles.plist
81+
# curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxproc.plist
82+
83+
curl -O https://gist.githubusercontent.com/tombigel/d503800a282fcadbee14b537735d202c/raw/ed73cacf82906fdde59976a0c8248cce8b44f906/limit.maxfiles.plist
84+
curl -O https://gist.githubusercontent.com/tombigel/d503800a282fcadbee14b537735d202c/raw/ed73cacf82906fdde59976a0c8248cce8b44f906/limit.maxproc.plist
85+
86+
sudo mv limit.maxfiles.plist /Library/LaunchDaemons
87+
sudo mv limit.maxproc.plist /Library/LaunchDaemons
88+
89+
sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist
90+
sudo chown root:wheel /Library/LaunchDaemons/limit.maxproc.plist
91+
92+
sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
93+
```
94+
95+
This works for Catalina as well as Mojave MacOS.
96+
97+
6198
# Get involved with SIG Docs
6299

63100
Learn more about SIG Docs Kubernetes community and meetings on the [community page](https://github.com/kubernetes/community/tree/master/sig-docs#meetings).
@@ -102,4 +139,4 @@ Participation in the Kubernetes community is governed by the [CNCF Code of Condu
102139

103140
# Thank you!
104141

105-
Kubernetes thrives on community participation, and we appreciate your contributions to our website and our documentation!
142+
Kubernetes thrives on community participation, and we appreciate your contributions to our website and our documentation!

0 commit comments

Comments
 (0)