I feel like something like this would be better suited to be in an
external application... since it will fail without a cache-backend.

Also, the implementation will have to change as Russell is about to
commit a logging patch with ticket #12012.

This would be best suited though for a custom handler in an external
app going forward... I will likely add something of this nature to one
of lumberjack's backends (aggregation of some-sort).

-k

On Thu, Sep 30, 2010 at 6:47 AM, Andrew Wilkinson
<andrewjwilkin...@gmail.com> wrote:
> Hi,
>
> Sorry the digging up an old thread, I'm a bit behind on my reading of
> django-dev.
>
> I have a patch in the bug tracker that fixes this exact problem -
> http://code.djangoproject.com/ticket/11565. The patch is just over a
> year old now so it might not apply that cleanly to the current trunk.
>
> The patch works by caching an MD5 of the traceback for each error with
> a timeout of settings.ERROR_EMAIL_RATE_LIMIT minutes. This prevents
> the same error being sent more than once in the time. It's not perfect
> because a single error might cause multiple tracebacks and you'd get
> one email for each distinct one. It's definitely better than the
> current situation though. It also relies on you having a cache backend
> set up.
>
> Unfortunately I never did get time to write unittests for it, and
> unittesting something like this is quite hard because of the timeout
> involved.
>
> Hope this is useful,
> Andrew
>
> On Thu, Sep 9, 2010 at 4:26 AM, Simon Litchfield <si...@slicmedia.com> wrote:
>> Hi all
>>
>> Default behaviour of sending an email on 500 error is great.
>>
>> Problem is on high traffic sites, and you might just be making a quick
>> update- literally within seconds you can bring your mail server down-
>> crash your mail client- or render your gmail account useless.
>>
>> With "batteries included" and "production ready" ethos in mind, I
>> reckon this needs fixing.
>>
>> 1) Max emails per minute setting
>>
>> 2) Include alternative error handler middleware in core
>>
>> I haven't tried it yet, but this looks interesting (note web2py
>> includes this) --
>> http://bitbucket.org/ashcrow/django-error-capture-middleware/wiki/Home
>>
>> Thoughts? I know I'm not the only one who has run into this (Russ?)
>>
>> Cheers
>> Simon
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Django developers" group.
>> To post to this group, send email to django-develop...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-developers+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-developers?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django developers" group.
> To post to this group, send email to django-develop...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-developers+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-developers?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to