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.