ThreadContext uses LocalDataStore to store ThreadSpecific
data instead should be using [ThreadStatic] variables.
------------------------------------------------------------
-----------------------------------------------------
Key: LOG4NET-148
URL: htt
ps://issues.apache.org/jira/browse/LOG4NET-148
Project: Log4net
Issue Type: Bug
Components: Core
Affects Versions: 1.2.10, 1.2.9
Environment: .Net Framework
Reporter: Hernando Torres-Rocca
Priority: Critical
According to this article (http://blogs.msdn.com/junfeng/archive/2005/12/31/508
423.aspx) and production issues encountered: using
LocalDataStore is not a scalable approach for any web server
that gets a significant amount of traffic.
The ThreadContext object should be modified to use
[ThreadStatic] variables.
>From the article:
The Whidbey RTM implementation of
Thread.GetData/Thread.SetData has several scalability issues
caused by global locks being taken. The appdomain-global
lock taken in LocalDataStore.SetData is one of them. There
is another global lock taken in
ThreadNative::GetDomainLocalStore that is even worse since
it is process-global.
The best workaround is to use [ThreadStatic] variables
instead of Thread.GetData/Thread.SetData
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.
|