Re: Weirdness in my PowerBook... Now reproducible
Re: Weirdness in my PowerBook... Now reproducible
- Subject: Re: Weirdness in my PowerBook... Now reproducible
- From: Jerry Krinock <email@hidden>
- Date: Sun, 02 Apr 2006 14:06:38 -0700
- Thread-topic: Weirdness in my PowerBook... Now reproducible
on 06/04/02 09:47, Jordan Krushen at email@hidden wrote:
> My guess would be that you're hitting the per-user limit. See ulimit
> -a. If you can switch to another user and still run stuff, then
> you're hitting your user limit (100 procs by default), not the system
> one.
That is correct, ulimit -u shows me that "max user processes" is 100.
So, I started opening Terminal windows (This is after quitting apps so that
my app would run.) After opening about 15 Terminal windows, after "Welcome
to Darwin!", it says:
-bash: fork: Resource temporarily unavailable
This occurs when I have 82 processes running with UID=501 (me).
Similarly, my app starts hanging on NSTask -waitUntilExit when I have more
than about 65 processes running with UID=501. Sometimes the uuidgen()
NSTask hangs too. Reduce the number of open Terminal windows and my app
launches with no problem.
Logically, the difference (82-65) should be the number of processes spawned
by my app, but that seems too high since my app spawns no more than 3
NSTasks and always with -waitUntilExit, so no more than one at a time is
running. So, the system seems to require more "margin" before it allows my
app to spawn an NSTask than it does a bash shell in Terminal.
Does anyone know how to increase the ulimit? After some Google-research, I
tried to increase it to 120 from 100 but it didn't seem to work:
Jerrys-Powerbook:~ jk$ ulimit -u
100
Jerrys-Powerbook:~ jk$ ulimit -u 120
Jerrys-Powerbook:~ jk$ ulimit -u
100
Maybe an emprical "solution" to the "problem" is something like this: When
app launches, see how many user (501) processes are running, and if this is
more than "ulimit -u" minus 20(?), tell user that system does not have
enough resources to launch my app. But oops, I need a way to get all this
info without using NSTask.
If no one here can explain this mess, I'll go find some Unix geeks to
consult with. But not for a few days because, now that I can reproduce it,
I have some other more pressing issues needing attention. I'll let y'all
know whenever I get some understanding of this.
Jerry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden