LarrySteele
Programmer
Working on one of those high visibility intranet sites where any errors causes a lot of noise.
I have a proof-of-concept page that catches errors and sends an email via cfmail. Works great....
However, if 100 people hit the site while it's down, I really don't need 100 emails. I just need the first email.
What I think I'd like is for the page to see when the last error email was sent. If less than 15 minutes, don't send again. If more than 15, then do send since it may be a new error.
The part that I haven't been able to figure out is how the page would be able to know when the last email was sent. Barring that, maybe when the last error occurred. I don't want to store errors in a database, because I'm trapping for database errors. If the database itself goes down, then I'm back to receiving more emails than necessary.
So finally to my question... Any suggestions on how I might limit the number of emails when we have errors?
Thanks in advance for any ideas.
I have a proof-of-concept page that catches errors and sends an email via cfmail. Works great....
However, if 100 people hit the site while it's down, I really don't need 100 emails. I just need the first email.
What I think I'd like is for the page to see when the last error email was sent. If less than 15 minutes, don't send again. If more than 15, then do send since it may be a new error.
The part that I haven't been able to figure out is how the page would be able to know when the last email was sent. Barring that, maybe when the last error occurred. I don't want to store errors in a database, because I'm trapping for database errors. If the database itself goes down, then I'm back to receiving more emails than necessary.
So finally to my question... Any suggestions on how I might limit the number of emails when we have errors?
Thanks in advance for any ideas.