Handle elmah.io downtime

Like every other SaaS product out there, we cannot promise you 100% uptime on elmah.io. We understand, that your logging data is extremely important for your business and we do everything in our power to secure that elmah.io is running smoothly. In fact, we normally have an average of 99.9 % uptime on our API.

But how do you handle that remaining 0.01 % of the time where you need to log a message in elmah.io and the service is down? You have a few options actually:

Subscribe to the OnMessageFail event

You can subscribe an event handler to listen for this situation (where communicating with the elmah.io API fails). To hook up an event handler, write this piece of code in your initialization code:

Elmah.ErrorLog.GetDefault(null); // Forces creation of logger client
var logger = ErrorLog.Client;
logger.OnMessageFail += (sender, args) =>
    var message = args.Message;
    var exception = args.Error;
    // TODO: log message and/or exception somewhere else.

Log to multiple logs

If you want to be able to rollback to another solution, in case elmah.io goes down, you can actually log to multiple error logs as described here: Logging to multiple ELMAH logs.

We constantly work to improve the uptime of the entire solution.

This article was brought to you by the elmah.io team. elmah.io is the best error management system for .NET web applications. We monitor your website, alert you when errors start happening and help you fix errors fast.

See how we can help you monitor your website for crashes Monitor your website