Wednesday, July 30, 2014

Fix for High CPU with Multiple SPUCWorkerProcessProxy and Conhost with SharePoint

Posted in [SharePoint], [Technical] By Doug Allen @ 8/22/2013

The other day I had a client contact me with an interesting SharePoint issue. Seemingly out of the blue, their SharePoint 2010 server CPU started being consumed by these two main processes with multiple instances:

  • SPUCWorkerProcessProxy.exe
  • conhost.exe

 When I looked into the issue, this is what I saw in task manager:

Runaway SPUCWorkerProcessProxy process

Whoa, that’s a lot of processes! 

And I saw the same thing for conhost.exe, which looked like this:

Runaway conhost process

So what are these processes and what do they do? I will spare you the long version and suffice to say they are related to Sandbox solutions. If you want the details, check out MSDN.

How to Fix the Issue in SharePoint

I suppose you could just stop the Sandbox service, however, there's a good chance you’re going to want to use Sandbox solutions at some point. So what else can you do?

I found a post on this issue on the forums that included a solution from Microsoft. It turns out to be a registry permissions issue. Check the following entries. The necessary permissions are specified for the local users group (SERVERNAME\Users):

  • HKLM\System\CurrentControlSet\Control\ComputerName\ActiveComputerName --> READ
  • HKLM\System\CurrentControlSet\Control\ComputerName\ComputerName --> READ
  • HKLM\System\CurrentControlSet\Control\Nls\Sorting\Versions --> READ
  • HKLM\Software\Policies\Microsoft\Windows\Safer\CodeIdentifiers --> QueryValue
  • HKLM\System\CurrentControlSet\Control\Session Manager --> QueryValue

In each case, the local Users group should have the listed permission. If not, add it. In my case (and others in the post), it was missing in the next to last key:

  • HKLM\Software\Policies\Microsoft\Windows\Safer\CodeIdentifiers

HKLM\Software\Policies\Microsoft\Windows\Safer\CodeIdentifiers

So let’s fix it. Click Add, and add the local Users group with the correct permission:

Query value registry permission

Now close the registry editor and open Central Administration. Go into Services on Server, and stop/start the Microsoft SharePoint Foundation Sandboxed Code Service. Now check out Task Manager:

SNAGHTML1eb03e58

I hope this post is helpful to other SharePoint users out there. If you have any questions about this entry or C5 Insight, please contact us.

 

, , , ,

Comments

Got something to say? Join the discussion »
    Posted by Nilldot on 7/14/2014
    I have everything OK with permission, but still see 100s of these processes.
    I have disabled Microsoft SharePoint Foundation Sandboxed Code Service and they are gone.
    It wwring, but we don't use any of these solutions, thereby works for us.
    Posted by Nycklander on 7/14/2014
    Running Windows Server 2012 R2 & SharePoint Server 2013 SP1, no luck yet, we tried ALL sort of things. no one resolved the issue: Too many SPUCWorkerProcessProxy.exe processes, launching one after another after a couple of seconds, and also when trying to add a sandboxed web part to a page, it says the user code host rejected the request because it is too busy... And it's not busy at all, except for replicating dozens of SPUCWorkerProcessProxy.exe processes... :(
    Posted by Marlou on 5/22/2014
    I had this same problemn on a windows server 2012 R2 running Sharepoint 2013. I used process monitor to fix all the access denied errors on both registy and file system and now it seems to run normally. Unfortunately, I can't tell you which registry keys or file system paths fixed the error because I had so many access denied errors, but at least you know now that it can be fixed :)
    Posted by Doug Allen on 5/6/2014
    Nilldot,

    I would recommend the same to you as previously to Robinio. Use Process Monitor to try and see what reg keys are getting query failed errors. So you checked all of the above keys, and they all have users set with either Read or QueryValue, and they all exist? Were any updates to Windows or SharePoint applied? Have you rebooted? Some of those keys are in the SYSTEM registry hive which is only read on boot. Hope it helps.

    Doug
    Posted by Nilldot on 5/6/2014
    Processes are back!!! ~ 80 SPUCWorkerProcessProxy.exe all permission are set as required.

    Any suggestions ?
    Posted by Doug Allen on 4/28/2014
    Robinio,

    Assuming you're running Windows Server 2012, those registry keys might be different. I would suggest running the Process Monitor tool (replaced regmon/filemon):

    http://technet.microsoft.com/en-us/sysinternals/bb896645

    If this is the cause, you can filter for just registry errors and try to find what key is causing the failure. Also check the events logs / ULS logs of the server to see if you see any other weird errors. Good luck! Let me know what you find, and I can make a note.
    Posted by Robinio on 4/28/2014
    Nice post. I'm running a sharepoint 2013 development environment and i have the same problem. Unfortunately the registry fixes doesn't work in my case.
    Are there any news about this issue?
    Posted by Nilldot on 3/27/2014
    Though Process Explorer provided detailed information for those processes, I didn't even think about permission issue on those reg entries.


    I have only 9 instances (before it was ~ 40) currently running.
    Thank you.
    Posted by MasterXP on 3/13/2014
    Excellent, Great solution.

    Thanks! :-)
    Posted by O on 10/31/2013
    THANK YOU :-)

    Great write-up, Great Solution!!!!

leave a reply

 [Quick Submit with Ctrl+Enter]

Remember my details
Notify me of followup comments via e-mail

C5_Insight

About C5 Insight

We are a Microsoft Gold Certified partner focusing on SharePoint, Microsoft Dynamics CRM and Salesforce.com.  Learn more about us by visiting our website.

Search

We Wrote the Bible on Microsoft SharePoint and Dynamics CRMBook-Microsoft Dynamics CRM 2011 and SharePoint 2010 Bible

Tags

Maximize

Recent Comments

Maximize

Blog Roll

Maximize

Disclaimer

The information herein may be used solely at your own risk.  No warranty is made by the author or by C5 Insight, Inc.

The opinons expressed herein are those of the individual authors and do not necessarily represent C5 Insight, Inc in any way.

Copyright 2011-2013 by C5 Insight