Notices
All Things Apple The Teamspeed Genius Bar!
Enter here to discuss your Apple products including iPhone, iPod, MacBooks and more!

Apps stop launching after a few hours on my MBP

Thread Tools
 
Search this Thread
 
Old Nov 13, 2010 | 04:02 PM
  #1  
Andrew's Avatar
Thread Starter
|
Teamspeed Pro
Joined: Aug 2007
Posts: 2,258
From: Palo Alto, CA
Andrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond repute
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.
 
Old Nov 13, 2010 | 05:06 PM
  #2  
Simba's Avatar
Banned
Joined: Jan 2008
Posts: 3,264
Simba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond repute
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.
 
Old Nov 13, 2010 | 07:41 PM
  #3  
Andrew's Avatar
Thread Starter
|
Teamspeed Pro
Joined: Aug 2007
Posts: 2,258
From: Palo Alto, CA
Andrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond repute
The fork problem will continue until I reboot, even if I quit everything. Running top in terminal just hangs until I reboot.
 
Old Nov 13, 2010 | 08:33 PM
  #4  
Simba's Avatar
Banned
Joined: Jan 2008
Posts: 3,264
Simba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond repute
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.
 
Old Nov 14, 2010 | 09:44 AM
  #5  
Andrew's Avatar
Thread Starter
|
Teamspeed Pro
Joined: Aug 2007
Posts: 2,258
From: Palo Alto, CA
Andrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond repute
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.
 

Last edited by Andrew; Nov 14, 2010 at 09:47 AM.
Old Nov 15, 2010 | 01:43 PM
  #6  
Simba's Avatar
Banned
Joined: Jan 2008
Posts: 3,264
Simba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond reputeSimba has a reputation beyond repute
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.
 
Old Nov 15, 2010 | 03:15 PM
  #7  
Andrew's Avatar
Thread Starter
|
Teamspeed Pro
Joined: Aug 2007
Posts: 2,258
From: Palo Alto, CA
Andrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond reputeAndrew has a reputation beyond repute
Alright, thanks Simba. I'll up the process limit for now, and when I order a new MBP in a few weeks, I'll be wiping this computer anyway.
 
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
mtechnik
Pit-Stop
2
Jan 2, 2012 11:40 PM
VegasFloyd
Pit-Stop
15
Aug 5, 2011 08:30 AM
Jack628
General BMW | Mini
3
Dec 2, 2008 05:04 AM
DJ
Gadgets & Electronics | Home Theater | Gaming
8
May 11, 2008 04:06 AM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 



All times are GMT -4. The time now is 07:20 AM.