2

In most of the websites I develop I add something to notify me by email of any 500 errors.

However, when something goes really wrong, I can get dozens of these error emails (once I got thousands).

So I want to implement some form of flood control. I develop in ASP.NET (C#) and also have some old sites in Classic ASP, but this question is not really about a specific language.

I was thinking of simply storing the last error number and email time in an application variable and if the next error is the same error number and within a certain time frame then do not send an email.

Just wondering what other techniques people are using to accomplish this.

johna
  • 10,540
  • 14
  • 47
  • 72

2 Answers2

2

If I were you, I'd try only allowing someone to send an error email if they haven't sent an error email for that type of error in a certain amount of time. If it was a different error, you could allow them to send that one too.

Zach B.
  • 663
  • 1
  • 7
  • 17
1

I have decided to go with storing the last error details and time in an application scope variable and if the error is the same as the previous error within a specific time frame I ignore it.

johna
  • 10,540
  • 14
  • 47
  • 72