SharePoint Performance Counters Missing

Add a comment January 19th, 2011

I had a client issue today that I’d never run across before. Their SharePoint Performance Counters were missing from PerfMon, and thier workflows weren’t running. The WorkFlow issue oddly enough makes sense although you wouldn’t think so from first glance. The OWSTimer service for SharePoint uses these performance counters, if they’re missing, you may not notice it from trying to run PerMon, but you’ll definitely notice when your workflows no longer execute. You’ll also start to see errors such as this one in the event view and ULS logs:  

w3wp.exe (0x1674) 0x07CC Windows SharePoint Services Workflow Infrastructure 72fq Unexpected Start Workflow: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly. at System.Diagnostics.PerformanceCounter.Initialize() at System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName, String instanceName, Boolean readOnly) at System.Workflow.Runtime.PerformanceCounterManager.CreateCounters(String name) at System.Workflow.Runtime.Hosting.DefaultWorkflowSchedulerService.OnStarted() at System.Workflow.Runtime.Hosting.WorkflowRuntimeService.HandleStarted(Object source, WorkflowRuntimeEventArgs e) at System.EventHandler`1.Invoke(Object sender, TEventArgs e)

The first attempted solution didn’t work so well, but it’s worth mentioning since if the performance counter .dll file was in the correct location (or had the correct permissions and assuming it’s not corrupt, this solution would have been successful:  

Try reloading the counters by running the following from the command line:

  1. Start > Run > CMD > Click OK
  2. Type: “cd\” then press enter
  3. Type: “cd C:\windows\system32” then press enter 4. Type : “lodctr /R” then press enter

Read more about that here:  

Microsoft KB 300956

We ended up correcting the issue using the following steps:  

  1. Copy the file: C:\Program Files\Microsoft Office Servers\12.0\Bin\ to: C:\windows\syswow64 (X64) and C:\windows\system32 (X86)
  2. Open the registry editor (Start > Run > Regedit), and set the following registry key :
  3. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Office Server Performance Monitoring\Performance]  

    Remove the full path: 

    C:\Program Files\Microsoft Office Servers\12.0\Bin\ 

    and replace it with just the filename: 


    Delete the following registry key if it exists:  

    [HKLM\SYSTEM\CurrentControlSet\Services\Office Server Performance Monitoring\Performance]  

    “Disable Performance Counters”  

  4. Reboot the server.
  5. After the reboot is complete, check that you are able add SharePoint performance counters.
  1. No comments yet.Be the first ?
  1. No trackbacks yet.
Comments feed