I'm using phps exec command to fork off many command line tools at once.
Right now I've set a limit of 150 processes to be running at any one time (across the whole operating system).
I'm running ps ax | wc -l to find out how many processes are currently running. Then I'm subtracting that amount from 150.
If there's 80 processes running then I can launch another 70.
I'm doing this on a loop.
The strange thing is that when watching the number of running processes with activity monitor, It's spiking to 200, 300 and so on until the system finally crashes.
I just can't work out why it's doing this. Does anyone have any ideas?
Right now I've set a limit of 150 processes to be running at any one time (across the whole operating system).
I'm running ps ax | wc -l to find out how many processes are currently running. Then I'm subtracting that amount from 150.
If there's 80 processes running then I can launch another 70.
I'm doing this on a loop.
The strange thing is that when watching the number of running processes with activity monitor, It's spiking to 200, 300 and so on until the system finally crashes.
I just can't work out why it's doing this. Does anyone have any ideas?