Web developers wiki ASP.NET Sitecore Sharepoint Kentico by Evident Interactive

Starting up a Sitecore website takes a long time

Modified: 2012/04/19 10:32 by vanthoog - Categorized as: Sitecore
Consider the following situation: starting up a Sitecore website takes a long time (several minutes) and the following error is reported many times in the Sitecore log-file:

4828 10:38:41 WARN  Could not create an instance of the counter 'Reflection.ObjectsCreated' (category: 'Sitecore.System')
Exception: System.InvalidOperationException
Message: Cannot load Counter Name data because an invalid index '' was read from the registry.
Source: System
   at System.Diagnostics.PerformanceCounterLib.GetStringTable(Boolean isHelp)
   at System.Diagnostics.PerformanceCounterLib.get_NameTable()
   at System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
   at System.Diagnostics.PerformanceCounterLib.CategoryExists(String machine, String category)
   at System.Diagnostics.PerformanceCounterCategory.Exists(String categoryName, String machineName)
   at System.Diagnostics.PerformanceCounterCategory.Exists(String categoryName)
   at Sitecore.Diagnostics.PerformanceCounters.PerformanceCounter.CanBeCreated()
   at Sitecore.Diagnostics.PerformanceCounters.PerformanceCounter.InitializeCounter(Boolean reset)

Most likely cause: the performance counters on your computer are corrupt.

To fix this first start a command prompt (using "run as administrator") and execute the following command:

lodctr /R

This command rebuilds the performance counters registry strings.

If this doesn’t help, you could try to (re)install the Sitecore performance counters. You can download them from http://sdn.sitecore.net/upload/sdn5/faq/administration/sitecorecounters.zip.

 © Evident Interactive BV