Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I seem to run into problems with the max. number of processes every so often. Anyone know what is best practice for fixing this?

Running OSX 10.6 on a MacBook Pro i7.

ulimit -a returns these values:

core file size (blocks, -c)     0
data seg size (kbytes, -d)      unlimited
file size (blocks, -f)      unlimited
max locked memory (kbytes, -l)      unlimited
max memory size (kbytes, -m)        unlimited
open files  (-n)        256
pipe size  (512 bytes, -p)      1
stack size (kbytes, -s)         8192
cpu time  (seconds, -t)      unlimited
max user processes  (-u)        266
virtual memory  (kbytes, -v)         unlimited

When the error occurred I checked, and there were 102 running tasks and 523 threads.

share|improve this question
up vote 2 down vote accepted

Use ulimit -a in a console to find out the limit. Here in Linux, it's max user processes.

If this value is too low, raise it: http://hints.macworld.com/article.php?story=200311151254441

share|improve this answer
    
Thank you for your input. I have added the output from ulimit to the original post. But shouldn't I have been fine, looking at these numbers? – exolab Apr 29 '11 at 8:25
    
Maybe. You can run 266 processes at the same time. The desktop, all your open applications and all terminals count towards that number. Try ps -fu $LOGNAME | wc -l to see how many processes you already have. – Aaron Digulla Apr 29 '11 at 8:32
    
Well, I have this tool running in my status bar which showed 102 tasks and 523 threads. I reckon that the tasks count towards the processes, which would mean I was well below the limit. Anyhow, I have now increased the limit to 2048. Let's see if that helps. Thank you for your support. – exolab Apr 29 '11 at 9:00

Check if your bash script isn't called itself recursively. Don't do that.

share|improve this answer
    
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. – Ramhound May 22 '15 at 2:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .