RE: AdoNetAppender connection timeouts

2008-11-16 Thread Hadley Willan
Hi all, Shortly after that last email, I went and read the docs for the ReconnectOnError http://logging.apache.org/log4net/release/sdk/log4net.Appender.AdoNetApp ender.ReconnectOnError.html I changed my connection string to have "Connect Timeout=1" so that there's only 1 sec for a connecti

RE: AdoNetAppender connection timeouts

2008-11-16 Thread Hadley Willan
Hi all, I've done some testing by writing a small test app that loops through, throws an ArgumentException, gets caught and logs the exception to log4net. My config has both a local file appender and an ADO Net appender. There's an artificial Sleep for a second in the loop so that it doesn't

RE: AdoNetAppender connection timeouts

2008-11-16 Thread Hadley Willan
Actually, I was just thinking about TCP timeouts and lockups to the caller. Is the log4net logging done in a separate thread to the caller? If the connection to the DB goes away, it's good that it'll reconnect, but during that connection time, how does log4net handle the timeout? Than

RE: AdoNetAppender connection timeouts

2008-11-16 Thread Hadley Willan
Thanks for getting back to me Ron. Okay, that's good news, that it'll try and reopen the connection. We tend to use buffer size of 0 to avoid any build up, so I'm not sure I'd gain anything by using the Rhino-tools logging, but thanks for bringing it to my attention. Regards Hadley

Re: AdoNetAppender connection timeouts

2008-11-16 Thread Ron Grabowski
The AdoNetAppender keeps a reference to an open connection. At some point it ensures the connection is open: // shortened somewhat...the actual code is longer if (m_reconnectOnError && m_dbConnection.State != ConnectionState.Open) { LogLog.Debug("Attempting to reconnect to database..."); Initia