Reopen: Error collecting stats

ES VERSION: (master/a2c1397e40e8771f8c495aa59618d0cab5419158, Sat, 7 Mar 2015 16:04:44 +0000)
OS: Windows (Microsoft Windows NT 6.2.9200.0)
RUNTIME: .NET 4.0.30319.34014 (64-bit)
After 1 mount (7 Mar - 7Apr):
[PID:01908:022 2015.04.07 19:54:29.417 INFO MonitoringService ] Received error reading counters. Attempting to rebuild.

[PID:01908:022 2015.04.07 19:54:31.155 ERROR MonitoringService ] Maximum rebuild attempts reached. Giving up on rebuilds.
[PID:01908:022 2015.04.07 19:54:31.159 ERROR MonitoringService ] Error while collecting stats
System.InvalidOperationException: The Counter layout for the Category specified is invalid, a counter of the type: AverageCount64, AverageTimer32, CounterMultiTimer, CounterMultiTimerInverse, CounterMultiTimer100Ns, CounterMultiTimer100NsInverse, RawFraction, or SampleFraction has to be immediately followed by any of the base counter types: AverageBase, CounterMultiBase, RawBase or SampleBase.
at System.Diagnostics.CategorySample.GetCounterDefinitionSample(String counter)
at System.Diagnostics.PerformanceCounter.NextSample()
at EventStore.Core.Services.Monitoring.Utils.PerfCounterHelper.GetGcStats() in c:\work\EventStore\src\EventStore.Core\Services\Monitoring\Utils\PerfCounterHelper.cs:line 119
at EventStore.Core.Services.Monitoring.SystemStatsHelper.GetSystemStats() in c:\work\EventStore\src\EventStore.Core\Services\Monitoring\SystemStatsHelper.cs:line 66
at EventStore.Core.Services.Monitoring.MonitoringService.CollectStats() in c:\work\EventStore\src\EventStore.Core\Services\Monitoring\MonitoringService.cs:line 127

Now counters are not working and server throws an exception for each call of GcStats… I’m going to restart the GES…

lodctr /R

This is windows performance counters. The above command line resets them at windows level.

This happens sometimes with windows especially if you hibernate we have seen.