Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Symptoms

Every hour on the hour, on all the servers in the farm running the Microsoft SharePoint Foundation Sandboxed Code Service, the following event is written to the system log event 7034:

Source: Service COntrol Manager
Event ID: 7034
Level: Error

"The SharePoint 2010 User Code Host service terminated unexpectedly.  It has done this .. time(s)."

At the same moment you can also observe an error message in the ULS logs:

"Performance Counter OS (pdh) call failed with error code PDH_INVALID_DATA"

Cause

ProcessNameFormat in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfProc\Performance; Data value has been set to 2 to show a PID in Performance Monitor.

When the service is started, it verifies its performance counters were registered correctly.
If the option was set in the registry to include a PID in the process name this verification fails.

Resolution

Set the data value of ProcessNameFormat in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfProc\Performance to 1

More Information

ProcessNameFormat in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfProc\Performance; Data value can be set to 2 in order to get a PID showing in Performance Monitor tracing. This value however should not be left set all the time or you will see the 7034 Event ID.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×