You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Roman Konovalov <ro...@greenrain.biz> on 2012/01/29 12:25:09 UTC

Performance saving logs to the database

Hi,

 

We have web server with about 60,000 page visits a day. Within the next 6
months the load is expected to reach 1,000,000 page visits a day. We use
log4net to store logs into the log database.

What is now unclear to me is if log4net is able to manage such a big load
from performance point of view. Log4net is synchronous and if log database
is down, then the entire process is waiting for log4net return call back (I
assume it returns call back when database connection timeout occurs).

 

Should we write our own appender to save logs into the database
asynchronously?

Or we would revisit our logging strategy and log only exceptions and errors
in production environment, turning on other levels of logging during
troubleshooting time?

 

Many thanks for replies.

 

Best regards,

Roman

 


Re: Performance saving logs to the database

Posted by Ron Grabowski <ro...@yahoo.com>.
If you're on SQL Server, try this:

https://github.com/lorenzomelato/rhino-commons/blob/master/Rhino.Commons/Logging/AsyncBulkInsertAppender.cs


________________________________
 From: Roman Konovalov <ro...@greenrain.biz>
To: log4net-user@logging.apache.org 
Sent: Sunday, January 29, 2012 6:25 AM
Subject: Performance saving logs to the database
 

Hi,
 
We have web server with about 60,000 page visits a day. Within the next 6 months the load is expected to reach 1,000,000 page visits a day. We use log4net to store logs into the log database.
What is now unclear to me is if log4net is able to manage such a big load from performance point of view. Log4net is synchronous and if log database is down, then the entire process is waiting for log4net return call back (I assume it returns call back when database connection timeout occurs).
 
Should we write our own appender to save logs into the database asynchronously?
Or we would revisit our logging strategy and log only exceptions and errors in production environment, turning on other levels of logging during troubleshooting time?
 
Many thanks for replies.
 
Best regards,
Roman