Commerce Server General - Strange warning in event log

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > September 2006 > Strange warning in event log





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Strange warning in event log
Vince Cooper

2006-09-06, 7:37 pm

We are seeing the following warning in our event log. We do not use or
address this object directly in any of our code. Does anyone have an idea
of what the problem and the potential solution may be?

The Commerce Server runtime has detected that more than 204 instances of
the SiteConfigReadOnlyFreeThreaded object have been created. Creating many
SiteConfigReadOnlyFreeThreaded instances will negatively affect the performance
of the site. Please refer to the Commerce Server documentation for the recommended
use of the SiteConfigReadOnlyFreeThreaded object.


Thanks!!
-Vince Cooper


David Messner [MSFT]

2006-09-16, 7:28 pm

Hi Vince,

We added this event since we've seen quite a few support cases over the
years where customers were (inadvertently) calling these objects on every
page request on the site, causing major performance and reliability
problems. Unfortunately the SiteConfig object is very expensive to run as
it executes a number of SQL queries and builds big hierarchical record
sets. It's only designed to be called at site startup. Any object that
takes a site name in its construction parameters (as opposed to a
connection string) is probably using SiteConfigFreeThreadedReadOnly to read
the admin database and look up the connection string.

There are some diagnostic techniques you can use to find out where this is
occurring. The simplest approach is to set the following DWORD value to
nonzero in the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Co
mmerce Server
2007\ThrowExceptionOnExcessiveUse

This will cause an exception to be thrown at the point where the warning
gets logged (warning - doing this in production will cause some requests to
fail). You can then attach a debugger and get the call stack of the
exception to find out the call stack that is causing this object to be
created.

You can also silence the warning by setting the following string value to
an empty string (followed by IISRESET):

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Co
mmerce Server
2007\ExcessiveUseMonitoredProcesses

You can change the threshold value as well (default is 100):

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Co
mmerce Server
2007\ExcessiveUseWarnLevel

Hope that helps - please do let us know if you find the culprit call stack!

Thanks
-djm
--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2006 Microsoft Corporation. All rights
reserved.

--------------------
Date: Wed, 6 Sep 2006 13:47:15 +0000 (UTC)
From: Vince Cooper <vcooper@oakwoodsys.com>
Subject: Strange warning in event log


We are seeing the following warning in our event log. We do not use or
address this object directly in any of our code. Does anyone have an idea
of what the problem and the potential solution may be?

The Commerce Server runtime has detected that more than 204 instances of
the SiteConfigReadOnlyFreeThreaded object have been created. Creating many
SiteConfigReadOnlyFreeThreaded instances will negatively affect the
performance
of the site. Please refer to the Commerce Server documentation for the
recommended
use of the SiteConfigReadOnlyFreeThreaded object.


Thanks!!
-Vince Cooper



J.F. Larente

2006-09-23, 1:32 am

You can declare your object as static in order for it to be initialized only
once.


"David Messner [MSFT]" <davidme@online.microsoft.com> wrote in message
news:76lkkG61GHA.4464@TK2MSFTNGXA01.phx.gbl...
> Hi Vince,
>
> We added this event since we've seen quite a few support cases over the
> years where customers were (inadvertently) calling these objects on every
> page request on the site, causing major performance and reliability
> problems. Unfortunately the SiteConfig object is very expensive to run as
> it executes a number of SQL queries and builds big hierarchical record
> sets. It's only designed to be called at site startup. Any object that
> takes a site name in its construction parameters (as opposed to a
> connection string) is probably using SiteConfigFreeThreadedReadOnly to
> read
> the admin database and look up the connection string.
>
> There are some diagnostic techniques you can use to find out where this is
> occurring. The simplest approach is to set the following DWORD value to
> nonzero in the registry:
>
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Co
mmerce Server
> 2007\ThrowExceptionOnExcessiveUse
>
> This will cause an exception to be thrown at the point where the warning
> gets logged (warning - doing this in production will cause some requests
> to
> fail). You can then attach a debugger and get the call stack of the
> exception to find out the call stack that is causing this object to be
> created.
>
> You can also silence the warning by setting the following string value to
> an empty string (followed by IISRESET):
>
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Co
mmerce Server
> 2007\ExcessiveUseMonitoredProcesses
>
> You can change the threshold value as well (default is 100):
>
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Co
mmerce Server
> 2007\ExcessiveUseWarnLevel
>
> Hope that helps - please do let us know if you find the culprit call
> stack!
>
> Thanks
> -djm
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> You assume all risk for your use. © 2006 Microsoft Corporation. All
> rights
> reserved.
>
> --------------------
> Date: Wed, 6 Sep 2006 13:47:15 +0000 (UTC)
> From: Vince Cooper <vcooper@oakwoodsys.com>
> Subject: Strange warning in event log
>
>
> We are seeing the following warning in our event log. We do not use or
> address this object directly in any of our code. Does anyone have an idea
> of what the problem and the potential solution may be?
>
> The Commerce Server runtime has detected that more than 204 instances of
> the SiteConfigReadOnlyFreeThreaded object have been created. Creating many
> SiteConfigReadOnlyFreeThreaded instances will negatively affect the
> performance
> of the site. Please refer to the Commerce Server documentation for the
> recommended
> use of the SiteConfigReadOnlyFreeThreaded object.
>
>
> Thanks!!
> -Vince Cooper
>
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com