logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Calin Pavel <calin.pa...@codemart.ro>
Subject All threads blocked while logging
Date Fri, 17 Oct 2014 09:55:43 GMT
Hello everybody,

I do have an .NET application (Windows Service) that collects data from 
a lot of sources (DBs, log files, machines event logs, ...) and uses 
Log4Net to log details of the actions / execution.  As expected, I'm 
using a high number of threads to collect data, threads that are writing 
logs in some files (RollingFileAppenderer).

Lately it happens that the entire application is BLOCKED because all 
threads were trying to acquire a read lock, like in the stack trace:
000000001ac3d998 00000000774715fa [HelperMethodFrame: 000000001ac3d998] 
000000001ac3da90 000007fef747b5e9 System.Threading.Thread.Sleep(Int32)
000000001ac3dac0 000007fef5fb9631 
000000001ac3db90 000007fef5cd297e 
000000001ac3dbf0 000007fef5cd28fa 
000000001ac3dc40 000007fe98fb4efd 
000000001ac3dcc0 000007fe98fb4907 
log4net.Repository.Hierarchy.Logger.Log(System.Type, log4net.Core.Level, 
System.Object, System.Exception)
000000001ac3dd30 000007fe98fb47f9 log4net.Core.LogImpl.Info(System.Object)

Did you encountered this before or did anybody else reported similar 

May be it's important to mention:
- I'm using Log4Net 1.2.13, .NET 4.5 on Windows 2008 R2
- that my threads have a timeout, and if they do not finish the job in 
the given interval they are aborted.

In relation with this, I found a possible explanation of application 
hanging here: 

Could it be that the acquire of read lock in Logger.CallAppenderers 
method to generate our problems?

Thank you in advance,
Calin Pavel

View raw message