[alert] (24)Too many open files: mod_wsgi (pid=240): Couldn't create unix domain socket.

All MAMP discussions around troubleshooting and anything related to MAMP. Be as detailed as possible here when posting an issue.
Post Reply
mampsupportmod
Site Admin
Posts: 156
Joined: Wed Jan 20, 2021 3:06 am

[alert] (24)Too many open files: mod_wsgi (pid=240): Couldn't create unix domain socket.

Post by mampsupportmod »

Since I increased the max open files limits in macOS 10.14, whenever MAMP Pro starts after a reboot Apache hangs. It opens dozens of httpd processes that are seemingly doing nothing in Activity Monitor. I am forced to wait minutes before Apache is able to Force Quit in MAMP and then Apache starts normal again. In addition, I believe macOS may be booting much much slower now after I adjusted the open file limits.

When I view the apache_error.log I see one line in it:

[Mon Sep 07 18:24:01 2020] [alert] (24)Too many open files: mod_wsgi (pid=240): Couldn't create unix domain socket.

I know this has to do with my current max files and process limits I enforced in order to fix the [Warning] File Descriptor 1032 exceeded FD_SETSIZE=1024. This fix which works very well. I am curious to know if anyone else increased their max process and open files similarly below and are experiencing my issues.


/Library/LaunchDaemons/


limit.maxfiles.plist:

Code: Select all

<?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>
<string>maxfiles</string>
<string>262144</string>
<string>524288</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
</dict>
</plist>


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>
<string>maxproc</string>
<string>2784</string>
<string>4176</string>
</array>
<key>RunAtLoad</key>
<true />
<key>ServiceIPC</key>
<false />
</dict>
</plist>
MAMP Support Forums is an unofficial support forum covering MAMP & MAMP Pro solution stacks.
Post Reply