fork: Resource temporarily unavailable
I'm running into a problem where I get a "fork: Resource temporarily unavailable" when attempting to run new processes in terminal.
I've traced it down to system set process limits. I found this ( http://hints.macworld.com/article.php?story=200311151254441) which explains how to increase the process limits (unfortunately written for osx 10.3), but that hasn't helped.
Currently, I've added the following lines to /etc/sysctl.conf
kern.maxproc=2048
kern.maxprocperuid=512
But it didn't help. The page mentioned above also suggested moving WindowServer aside and instead setting up a shell script that first ran "ulimit -u 512", then the original WindowServer binary. While I did make the script executable, this rendered my laptop unbootable (in so far as the login window would never come up. I booted of the system cd and replaced the script with the original WindowServer binary). I looked through the console log and found this error:
The following job tried to hijack the service "com.apple.windowserver" from this job: 0x10011f6d0.anonymous.WindowServer.ori
(I had renamed the original binary to WindowServer.original, which I assume is what's causing the .ori)
Now, I can add a 'ulimit -u 512' to my bashrc which will solve the problem for terminal windows that open before hitting 266 processes, but if I try to open a new terminal window, it will fail.
Any idea how I can raise the per-user process limit for the entire machine?
I've traced it down to system set process limits. I found this ( http://hints.macworld.com/article.php?story=200311151254441) which explains how to increase the process limits (unfortunately written for osx 10.3), but that hasn't helped.
Currently, I've added the following lines to /etc/sysctl.conf
kern.maxproc=2048
kern.maxprocperuid=512
But it didn't help. The page mentioned above also suggested moving WindowServer aside and instead setting up a shell script that first ran "ulimit -u 512", then the original WindowServer binary. While I did make the script executable, this rendered my laptop unbootable (in so far as the login window would never come up. I booted of the system cd and replaced the script with the original WindowServer binary). I looked through the console log and found this error:
The following job tried to hijack the service "com.apple.windowserver" from this job: 0x10011f6d0.anonymous.WindowServer.ori
(I had renamed the original binary to WindowServer.original, which I assume is what's causing the .ori)
Now, I can add a 'ulimit -u 512' to my bashrc which will solve the problem for terminal windows that open before hitting 266 processes, but if I try to open a new terminal window, it will fail.
Any idea how I can raise the per-user process limit for the entire machine?
MacbookPro 2.4ghz i5, 8gb, Mac OS X (10.6.6)