Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Fast User Switching Problem (Sometimes Cannot open applications with two accounts logged in)

Hi there,


I'm using a Late 2012 21.5" iMac running Sierra (10.12.2), (though the problem has existed for some time, I believe dating back to El Capitan).


I'm running into some problems with Fast User Switching.


The main problem seems to be that after two users are logged in for a while (might take anywhere from a few days to a week) we run into a problem where everything slows down quite a bit and launching new applications gives us an error message that says something to the effect of "Cannot open this Application" new processes generally can't spawn but the computer keeps running processes that are already running, albeit generally pretty slowly.


In the past I've mostly fixed this by just restarting the computer because it seems like the fastest way to solve it, and it always seems to crop up when I or my wife have something we need to get done, This especially annoys my wife because she doesn't actually use the iMac all that often (she does most everything on her iPad but occasionally needs to use the iMac) but quite often by the time she gets on the iMac we're experiencing the problem. It's gotten to the point that she doesn't want to log into her own account because it always seems slow and unusable. I'd prefer we keep using our own login's so things are exactly as we expect them to be when we get back to the computer (I tend to leave a lot of windows and tabs open for various projects, not to mention I'd prefer not to have gifts I'm buying for her ruined while I'm doing research, as almost happened this past month).


Until today I had only suspected that the issue was related to Fast User Switching, but hadn't had time to really dig into it to try and experiment and figure it out. Today I ran into the issue and did a bit more experimenting. Because I had some time Instead of just restarting the computer I switched over to my wife's account, (which takes a very long time whenever the issue is happening, which is another annoyance), and then logged her out and switched back to my account. Low and behold I could launch new programs again.


I've gone to the console and I can see when the problem is happening but I can't figure out what the root cause is. Below is some of the logs showing what I'm seeing when the problem is happening I haven't yet gone so far as to reinstall OS X and then load our info back on from a time machine backup, but I'm not against giving that a try, though I'd prefer something less drastic if anyone has any suggestions.


Please let me know if you have any questions or need any further information.


Logs:


Dec 31 12:58:21 BeanBrandoniMac com.apple.xpc.launchd[1] (com.apple.iTunesCacheExtension): Could not spawn trampoline /usr/libexec/xpcproxy: 35: Resource temporarily unavailable

Dec 31 12:58:21 BeanBrandoniMac com.apple.xpc.launchd[1] (com.apple.iTunesCacheExtension): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

Dec 31 12:58:21 BeanBrandoniMac com.apple.xpc.launchd[1] (com.apple.iTunesCacheExtension): Deferred spawn of service failed: 35: Resource temporarily unavailable

Dec 31 12:58:21 BeanBrandoniMac com.apple.xpc.launchd[1] (com.apple.iBooks.CacheDelete): Could not spawn trampoline /usr/libexec/xpcproxy: 35: Resource temporarily unavailable

Dec 31 12:58:21 BeanBrandoniMac com.apple.xpc.launchd[1] (com.apple.iBooks.CacheDelete): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

Dec 31 12:58:21 BeanBrandoniMac com.apple.xpc.launchd[1] (com.apple.iBooks.CacheDelete): Deferred spawn of service failed: 35: Resource temporarily unavailable

Dec 31 12:58:22 BeanBrandoniMac com.apple.xpc.launchd[1] (com.apple.WebKit.WebContent.42922E43-A512-4182-9CB8-D1C8966FEA07): Could not spawn trampoline /usr/libexec/xpcproxy: 35: Resource temporarily unavailable

Dec 31 12:58:22 BeanBrandoniMac com.apple.xpc.launchd[1] (com.apple.WebKit.WebContent.42922E43-A512-4182-9CB8-D1C8966FEA07): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

Dec 31 12:58:22 BeanBrandoniMac com.apple.xpc.launchd[1] (com.apple.WebKit.WebContent.42922E43-A512-4182-9CB8-D1C8966FEA07): Deferred spawn of service failed: 35: Resource temporarily unavailable

Dec 31 12:58:22 BeanBrandoniMac com.apple.xpc.launchd[1] (com.gog.galaxy.commservice): Could not spawn trampoline /usr/libexec/xpcproxy: 35: Resource temporarily unavailable

Dec 31 12:58:22 BeanBrandoniMac com.apple.xpc.launchd[1] (com.gog.galaxy.commservice): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

Dec 31 12:58:22 BeanBrandoniMac com.apple.xpc.launchd[1] (com.gog.galaxy.commservice): Deferred spawn of service failed: 35: Resource temporarily unavailable

Dec 31 12:58:22 BeanBrandoniMac com.apple.xpc.launchd[1] (com.gog.galaxy.commservice): Could not spawn trampoline /usr/libexec/xpcproxy: 35: Resource temporarily unavailable

Dec 31 12:58:22 BeanBrandoniMac com.apple.xpc.launchd[1] (com.gog.galaxy.commservice): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

Dec 31 12:58:22 BeanBrandoniMac com.apple.xpc.launchd[1] (com.gog.galaxy.commservice): Deferred spawn of service failed: 35: Resource temporarily unavailable

Dec 31 12:58:23 BeanBrandoniMac com.apple.xpc.launchd[1] (com.apple.universalaccessd): Could not spawn trampoline /usr/libexec/xpcproxy: 35: Resource temporarily unavailable

Dec 31 12:58:23 BeanBrandoniMac com.apple.xpc.launchd[1] (com.apple.universalaccessd): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

Dec 31 12:58:23 BeanBrandoniMac com.apple.xpc.launchd[1] (com.apple.universalaccessd): Deferred spawn of service failed: 35: Resource temporarily unavailable

iMac, macOS Sierra (10.12.2)

Posted on Dec 31, 2016 10:37 AM

Reply
29 replies

Aug 2, 2017 11:35 AM in response to John Galt

Regardless, the point remains that it is still a huge time commitment and a huge inconvenience, so whether I decide to do it or not, it's not going to happen any time in the immediate future. It'll have to wait until I have an entire day to commit to such a project, which might be a while, especially as the iMac works just fine most of the time, so that kind of time commitment is going to be a low priority from other things I could be doing with a free day.


If/when I get the time I may elect to do a total reinstall like you suggest. I really do appreciate the information you've provided, even if I do solve this issue another way, I may decide to do as you suggest "just in case."


But in the meantime, since it will be a while before I can do what you're suggesting, I'm hoping someone has more specific suggestions for this particular problem.

Aug 3, 2017 5:56 AM in response to Brandonshire

Brandonshire wrote:


Regardless, the point remains that it is still a huge time commitment and a huge inconvenience, so whether I decide to do it or not, it's not going to happen any time in the immediate future. It'll have to wait until I have an entire day to commit to such a project, which might be a while, especially as the iMac works just fine most of the time, so that kind of time commitment is going to be a low priority from other things I could be doing with a free day.

While John's suggestion might seem like a huge inconvenience, you've been dealing with this problem, at least on these forums, for six months. I understand the normal human tendency to live with a small but endless inconvenience rather than to expend the larger amount of time. But, once you've done that, the small inconvenience goes away. And, yes, John is highly likely to be right. Even if the software that he's recommending be removed isn't the only problem, there's no good way to find out what is until it's cleared out.


Other suggestions, while they may be easier and faster to implement, also won't resolve the issue.

Aug 3, 2017 7:27 AM in response to dvsjr

Now that is interesting...


Do you mind if I ask you for a few more specifics about your particular problem? Are you getting this error when you have multiple accounts logged in at the same time? Or does it crop up at other times?


Does it happen when there are a lot of processes running (like having many browser tabs open, and multiple other programs running simultaneously)? Or after there have been a lot running (either at the same time or over time)? I've seen a smattering of suggestions online that similar problems may be connected with system and/or user process limits and that some similar issues have been resolved by upping that limit (something I only found late yesterday and haven't had a chance to figure out how to try), so I'm wondering if that could be related.


The BOINC connection is also interesting. It could be a coincidence, but it seems worth looking into. I may try uninstalling BOINC and seeing what happens.


Finally, I have to ask, have you ever used CleanMyMac or any other similar program that you can recall?

Aug 4, 2017 7:15 PM in response to Brandonshire

Update. I stayed up later than I should have last night, but I'm pretty sure I found the actual culprit, and am zeroing in on the exact procedure to solve the problem.


As I had begun to suspect from reading up on other similar error messages (mostly that developers were getting while running terminal commands), I'm pretty sure the issue is that with both users running I'm running up against the default max process limit.


The evidence comes from Activity Monitor, just not for memory as the first suggestion posited. By paying attention to the number of processes listed in Activity Monitor, and keeping the console open next to it, I could very clearly see that the problem started as I got close to 512 total processes. Everything was fine and I was not getting the trampoline error message in the console until I got to about 510 to 511 processes (once I got to that point it would jump back and forth between 511 and 510 or so as various system processes attempted to run). At that point I'd start getting the error all over the place and attempting to launch an app would give me the "Could not open ___ application" error box. I could then quit program and/or kill processes to get further below that limit and things would return to (relative) normal. A few of the programs I attempted to launch while the problem was going on did get "stuck" in a situation where I couldn't quit them or even force quit them using the regular procedure, but other apps would launch and i'd stop seeing errors in the console.


I had noted previously been able to force the problem to recur more quickly (so I didn't have to wait days or a week with both accounts logged in) by launching a lot of apps on both accounts, but hadn't paid attention to the number of processes or when precisely the problem started or stopped.


After this I restarted and tried to see if i could force the situation to recur without a second account logged in. What I found was that unsurprisingly it's really hard to reach 512 processes in just one account. The best I managed was about 430 before I decided it wasn't worth continuing to try, with an absurd number of apps running, but I'm pretty confident that it would have happened if I had reached 512. It seems like from watching that number some more that under normal circumstances when I'm running just my account I'm usually somewhere in the high 200's or mid to low 300's in terms of processes running at any given time. Logging in to just my wife's account I'll be somewhere in the mid 200's. Of course some of those processes are shared, so when I have both accounts running at the same time I don't just immediately hit 500 or so, but it usually puts me somewhere in the mid to upper 400's, and can quickly go up from there to start hitting that limit.


From what I've been reading many macs start out with a default process limit of 512. Though it seems like there is some variability there? Possibly depending on RAM and other factors? I'm seeing some different reports and of course most are for disparate versions of Mac OS/OS X, so it's hard to parse what's changed from version to version and what hasn't, but I would think if any Mac would start with a higher limit mine likely would, so its' possible that I inherited that setting from my previous mac when I moved everything over with migration assistant.


Anyway, the two things i'm looking into now are are 1) how to raise that limit, what if any dangers that might pose (so far it's not sounding like any, from the reports I've seen but I'm still reading up on it), and 2) Taking another look at all the programs I have running by default on my account and seeing what I can bear to live without. Unfortunately, since our Mac is our DVR and a lot of our media is viewed there and such some of the stuff I have running all the time will have to stay, but I may be able to find a few things that I can live without (or only launch when I need them). I actually did some of that a few months back when this all started, but may need to get more aggressive, especially if I decide not to raise the process limit.


Anyway just wanted to give an update for others having this problem and for anyone who stumbles on this in the future. I'll update again once I know more and especially if/when I actually resolve the problem.

Aug 4, 2017 7:22 AM in response to Brandonshire

This is interesting. I wonder if indeed the limit is somehow related to installed memory.

I don't recall you stating how much memory is on your mac.

As a further data point, I tried to replicate this, creating a large number of processes in two accounts, and I could NOT cause the problem to occur. I went a little above 600 before I gave up.

Aug 4, 2017 7:15 PM in response to Luis Sequeira1

So what I'm seeing in a few places (and it's been tough so far to find official reliable information) is that in Sierra that limit is supposed to default to 709 processes (other people seem to say it varies based on RAM etc. so it's a bit confusing so far, but I've only spent a little while in my research). But if that's correct then it would lend credence to my theory that I might have inherited the limit from an older Mac (potentially a much older one!) when I migrated over. Anyway I'll keep digging and once I'm at home I can see what my Mac says is it's current limit, bumping it up to 709 might very well be more enough to solve my problems.


[Edit to add] I have 24GB of RAM in my current Mac, the old one had 16GB (and the one before had... less I think it might have been as low as 4, though I might have upgraded it at some point, though I don't quite recall).

Aug 13, 2017 7:52 AM in response to Brandonshire

Brandonshire,


WOW!!!


I looked at the above EtreCheck report and all I can say is: as a start is that you should donate to EtreCheck for saving you and all of us from a lot of painful troubleshooting. Your machine has so many applications and background processes set to run that I would consider fail errors to have on a machine in 2017, or at best, not "best practice". I have not read all the replies but my recommendations are going to involve a lot of changes that involve uninstalling ( likely some terminal work and manual uninstalling ). I would go as far as recommending a completely fresh start without importing all of your history and ONLY installing things that a current and needed. There is so much that likely is unnecessary and is causing problems. Literally, I would say that you need to uninstall and delete more that 50%, maybe 85% to all the User and System level LaunchAgents, LaunchDaemon, Internet Plug-Ins and PreferencePanes, not to mention ALL the Startup Items and Kernel Extensions. This is going to be painful and "scary" for you however give a new powerful machine as you have that will live for many years, you need to talk some professional advice from an experienced and current Mac focused tech support person at the start to clean house.


I could be such a person but it is more important that you find someone and perhaps in person local to you.


EtreCheck is exposing a lot. My second tool for this case is going to be MalwareBytes. You can start with the free version for Home Users. Believe 100% what it will tell you and let it do the first cut thru cleaning. ( For the record, I do sell MalwareBytes as one of the products as part of my MSP offering. )


I would expect that even a local professional to you would take a few hours to clean house with you because there are a number of questions and back and forward that would have to happen and you will likely have questions and honest are likely to fight some of the recommends because you are apparently use to using some historical tools that I would most definitive want to delete even if they are not causing a specific problem today.


FYI: John Galt comment of removing CleanMyMac I would totally agree with but it is the tip of the iceberg, seriously.

Aug 13, 2017 7:57 AM in response to Terry Fundak

OK. I now have read thru a couple of the other replies. As expected, the history of you machine and your habits accumulated over history are the biggest obstacle to a quick resolution . I encourage you for find a single experienced person to work with, otherwise you will spend dozens of hours in back and forth and never get a clean starting point.

Aug 14, 2017 7:01 AM in response to Terry Fundak

Terry, Thank you for your concern. Though I assume you've read far enough now to find that I've actually already solved this problem.


As for your suggestions, I've already removed a lot of these things and am still going through and removing others. Many are leftover from programs I haven't had installed for years (in at least one case something I haven't had installed for several Macs!) and I had no idea until running Etrecheck that they had still left remnants around on my Mac, and a few that I had completely forgotten I had installed in the first place and have since removed. There's really not much in there I can't identify the source of, and none of it is malware, so I doubt Malware Bytes is going to be necessary. (I am very familiar with and generally trust Malware Bytes, at least on the Windows side as we use it at work, but I'm not convinced it wouldn't be more trouble than it's worth on a Mac).


All of that being said, the main thing I was interested in CleanMyMac for, during the time I was using it, was it's ability to remove programs completely without having to hunt around through multiple (often hidden) directories for all the bits and bobs left behind by programs when you uninstall them manually. Again, I'm not arguing that I should keep using CleanMyMac or anything like that, but I understand why such programs are as popular as they are. Apple really needs to implement some kind of standardized way to uninstall programs. The uninstallers that come with programs (when they come with one at all) often don't do a very good job of actually removing all components (sometimes I think they're just sloppy, and sometimes I think this is intentional on the parts of some less ethical developers). The average user should not have to go through this many steps to actually completely remove something. One shouldn't have to go hunting through hidden directories and other parts of the system that the average user is generally discouraged from mucking around in just to make sure a kernel extension, or some other component that's been left behind. You shouldn't generally have to go in behind an uninstaller and make sure it actually got everything.


Anyway, I'm already working on the issue, but thanks for the general suggestion.

Fast User Switching Problem (Sometimes Cannot open applications with two accounts logged in)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.