Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Execute retry logic in Send() method even if exception is not of type WebException #25
Conversation
…retry logic so as to not cause the client to crash during an unexpected exception.
… retry logic as a WebException does.
|
Any response on this? Happened to us again, we can use our own fork but would rather not deviate. |
|
We had this bug too when using the loggly .net component. |
Hello,
We had an issue in production yesterday that caused our application to go offline on a couple of web servers for about a 1.5 minutes. During our investigation we found the following call stack:
Apr 24 14:59:12: Unhandled Exception: System.OperationCanceledException: The operation was canceled.
Apr 24 14:59:12: at System.Net.HttpWebRequest.GetResponse()
Apr 24 14:59:12: at log4net.loggly.LogglyClient.Send(ILogglyAppenderConfig config, String message)
Apr 24 14:59:12: at log4net.loggly.LogglyAsyncHandler.SendLogs()
Apr 24 14:59:12: at System.Threading.Thread.ThreadMain_ThreadStart()
Apr 24 14:59:12: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
It looks like the LogglyClient received an exception of type System.OperationCanceledException which is not handled in the Send() method so it crashed our process. This PR accounts for generic exceptions and executes the same retry logic. Applicable unit test has also been added.