Apps stop launching after a few hours on my MBP
#1
Apps stop launching after a few hours on my MBP
Recently I've been running into a problem where apps will stop launching (via Google Quick Search or normal launcher), and I get errors about not being able to fork a new process when trying to load iTerm. A reboot fixed it, but it comes back after a while.
Looking at system resources, I'm not running out of memory, so I'm thinking it might be a memory problem. I'm very close to pulling the trigger on a new MBP, but would like to fix this in the mean time.
Looking at system resources, I'm not running out of memory, so I'm thinking it might be a memory problem. I'm very close to pulling the trigger on a new MBP, but would like to fix this in the mean time.
#2
That means you've run out of new process slots. You must be running a fairly ridiculous number of resident programs for that to occur.
Maxprocs is 250-500 out of the box on most systems. You can increase it by tweaking launchd's parameters, but I would be more of a mind to figure out what the heck you have that's spinning up that many processes.
Maxprocs is 250-500 out of the box on most systems. You can increase it by tweaking launchd's parameters, but I would be more of a mind to figure out what the heck you have that's spinning up that many processes.
#4
You must be running something that is cranking up an unusually high number of running processes. I would take an inventory of everything you have running and go from there. In common practice, nobody should run into the hard fork limit.
Be that as it may, you can change it relatively easily.
Open a terminal, sudo su to root, and run:
echo 'limit maxproc 512 2048' > /etc/launchd.conf
Then reboot.
Be that as it may, you can change it relatively easily.
Open a terminal, sudo su to root, and run:
echo 'limit maxproc 512 2048' > /etc/launchd.conf
Then reboot.
#5
Thanks, if I can't figure out what's causing it, I'll up the limit. Of course, if something is really generating a lot of processes, that will just extend the time before I run into problems, and not fix anything.
It's frustrating that I can't run top when this happens, and the Activity Monitor shows everything behaving normally.
I should probably mention that I'm doing development on this machine, so I have MySQL, ruby, a rails server, Sequel Pro, Photoshop, FireFox (with Pandora streaming in one instance), TextMate, and iTerm running (but iTerm is only running one or two instances). Not anything crazy, but more than your average user.
It's frustrating that I can't run top when this happens, and the Activity Monitor shows everything behaving normally.
I should probably mention that I'm doing development on this machine, so I have MySQL, ruby, a rails server, Sequel Pro, Photoshop, FireFox (with Pandora streaming in one instance), TextMate, and iTerm running (but iTerm is only running one or two instances). Not anything crazy, but more than your average user.
Last edited by Andrew; Nov 14, 2010 at 09:47 AM.
#6
Upping the hard maxproc limit to ~2048 should solve the problem, unless of course you have a runaway condition that is trying to spool up an infinite number of processes. If so, it'll uncover that as well.
I would keep an eye on your swap size while the weirdness happens, as well, it's as good an indicator as top in some cases.
I would keep an eye on your swap size while the weirdness happens, as well, it's as good an indicator as top in some cases.
Thread
Thread Starter
Forum
Replies
Last Post
mtechnik
Pit-Stop
2
Jan 2, 2012 11:40 PM
Jack628
General BMW | Mini
3
Dec 2, 2008 05:04 AM
DJ
Gadgets & Electronics | Home Theater | Gaming
8
May 11, 2008 04:06 AM
Bookmarks
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)











