logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karim Bourouba <kar...@hotmail.com>
Subject RE: Experiencing locks while using AdoNetAppender
Date Tue, 18 Aug 2009 12:44:23 GMT


Hi,
 
I have seen similar behaviour when working with Access. I know this wont help, but I found
it to be a limitation of file based databases unfortunately :(



 



Subject: Experiencing locks while using AdoNetAppender 
Date: Tue, 18 Aug 2009 14:29:17 +0200
From: PKa@hoogendoorn.nl
To: log4net-user@logging.apache.org


Hi, 

I am using the AdoNetAppender for logging messages from multiple application. All the applications
log into one sqllite database. Sometimes when a lot of information is logged I am experiencing
exceptions like:

log4net:ERROR [AdoNetAppender] Exception while writing to database
System.Data.SQLite.SQLiteException: The database file is locked
database is locked
at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
at System.Data.SQLite.SQLiteTransaction..ctor(SQLiteConnection connection, Boolean deferredLock)
at System.Data.SQLite.SQLiteConnection.BeginTransaction(Boolean deferredLock)
at System.Data.SQLite.SQLiteConnection.BeginDbTransaction(IsolationLevel isolationLevel)
at System.Data.Common.DbConnection.System.Data.IDbConnection.BeginTransaction()
at log4net.Appender.AdoNetAppender.SendBuffer(LoggingEvent[] events) 

The default CommandTimeout in the AdoNetAppender on the IDbCommand is 30 seconds, but I would
like to influence this timeout in the log4net configuration (file) so that I can influence
the timeout on the logging if the database is locked for a longer portion of time. Reducing
the timeout may lead to events getting lost, but I prefer that to our application hanging
for the full CommandTimeout waiting for the database to become unlocked.

Is it possible to configure the timeout using configuration? or would it be better to choose
for a solution like deriving from the AdoNetAppender and add the functionality?

Thanks in advance for any answers. 

Patrick 

**********************DISCLAIMER**********************
Deze E-mail is uitsluitend bestemd voor de geadresseerde(n). 
Verstrekking aan en gebruik door anderen is niet toegestaan. 
De Hoogendoorn Groep sluit iedere aansprakelijkheid uit die 
voortvloeit uit elektronische verzending.
This E-mail is intended exclusively for the addressee(s), 
and may not be passed on to, or made available for use by 
any person other than the addressee(s). 
The Hoogendoorn Group rules out any and every liability 
resulting from any electronic transmission.
*******************************************************
This message has been scanned by Network Associates' 
McAfee AntiVirus Technology
_________________________________________________________________
Windows Live Messenger: Celebrate 10 amazing years with free winks and emoticons.
http://clk.atdmt.com/UKM/go/157562755/direct/01/
Mime
View raw message