views:

83

answers:

3

I use django error reporting via email. It is normally a very helpful feature, except that now we have 5 minutes of database downtime and I got 2000 emails. Is there any middleware that will help me throttle the number of emails django can send out per minute?

+1  A: 

I presume the database downtime was not intentional, in which case you probably should have put your Django process into some kind of maintenance mode or taken it offline?

Otherwise, the usual mail app is django-mailer which might have helped you simply because it stores outgoing mail in your database and thus would have failed :)

If you really need to rate limit it would be best to do so in your MTA. This could mean the ability to just shut down the part of the MTA process responsible for sending mail or something exotic like using this patch for qmail to throttle incoming connections as a means of fighting spam

Van Gale
A: 

maybe Nagios' page on flapping is worth reading

[http://nagios.sourceforge.net/docs/3_0/flapping.html][1]

thanos
+2  A: 

One option is to switch to something like ErrorStack for error-reporting. I wrote a django app to make it stupid-simple to integrate into your project.

Carl Meyer
This sounds like a good approach. Did you also evaluate hoptoad.com? I need to decide which service to pick.
Gattster
No, I haven't looked at hoptoad in detail.
Carl Meyer