[ https://issues.apache.org/jira/browse/LOG4NET-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ron Grabowski updated LOG4NET-148: ---------------------------------- Attachment: ThreadContextProperties.cs [ThreadStatic] private static PropertiesDictionary _dictionary; > ThreadContext uses LocalDataStore to store ThreadSpecific data instead should > be using [ThreadStatic] variables. > ----------------------------------------------------------------------------------------------------------------- > > Key: LOG4NET-148 > URL: https://issues.apache.org/jira/browse/LOG4NET-148 > Project: Log4net > Issue Type: Bug > Components: Core > Affects Versions: 1.2.9, 1.2.10 > Environment: .Net Framework > Reporter: Hernando Torres-Rocca > Assignee: Ron Grabowski > Priority: Critical > Fix For: 1.2 Maintenance Release > > Attachments: ThreadContextProperties.cs > > > According to this article > (http://blogs.msdn.com/junfeng/archive/2005/12/31/508423.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. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira