Decrease amount of identical "Email reports"

20 views
Skip to first unread message

Nacharov Mikhail

unread,
Jan 9, 2017, 5:53:33 AM1/9/17
to Django users
Hi folks and Happy New Year!

I have a high load production site. If I make a mistake (some users getting 500 error) all ADMINS will be receiving error emails until bug won't be fixed.
This causes email server load and it's quite annoying reading thouse idetical emails sometimes. It's also possible to miss anouther error report inside a bunch of identical..

Did somebody know how to decrease amount of identical Email reports? Maybe set some timeout for the same message subject would be correct decision?

Maybe there is a better way for monitor web server events?

roboslone

unread,
Jan 9, 2017, 6:06:38 AM1/9/17
to django...@googlegroups.com
Hi! I don't know how to help you with ADMINS notifications, but you can use Sentry to collect logs and errors. I believe you could set up notifications there as you like.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2b54c365-fb9b-4618-89b5-ba88b18e6487%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sam Walters

unread,
Jan 9, 2017, 6:54:37 AM1/9/17
to django...@googlegroups.com
Hi
Presumably you have had a look at logging docs and its not good enough?
https://docs.djangoproject.com/en/1.10/topics/logging/

With these sort of project requirements the way i have solved this in the past is to:
*Work out who needs to receive certain messages. Draw a grid with all useful messages on one axis and all admins of various types on the other. Tick the grid boxes for who receives what.
*write a model to save 'messages' with timestamps level/seriousness of critical errors. Basically whatever you think is important.
*use decorators in views to write/save messages to the 'message' model. (herein you an add logic to remove duplicates, cascade critical errors straight into sending to admin email accounts as methods within the model class whatever your approach might be) Run an email queue every 24 hours that sends aggregated message groups relevant to each admin.
https://docs.djangoproject.com/en/dev/topics/http/decorators/

Implement this for the most common and annoying duplicate messages to start with.

Always have an admin of some sort that gets all the critical error messages eg: say 500 'server error' type messages.

Hope this provides some insight.




--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

Melvyn Sopacua

unread,
Jan 14, 2017, 11:45:58 AM1/14/17
to django...@googlegroups.com

Hello,

 

On Monday 09 January 2017 00:53:13 Nacharov Mikhail wrote:

 

> I have a high load production site. If I make a mistake (some users

> getting 500 error) all ADMINS will be receiving error emails until

> bug won't be fixed.

> This causes email server load and it's quite annoying reading thouse

> idetical emails sometimes. It's also possible to miss anouther error

> report inside a bunch of identical..

>

> Did somebody know how to decrease amount of identical Email reports?

> <https://docs.djangoproject.com/en/1.10/howto/error-reporting/#email-r

> eports> Maybe set some timeout for the same message subject would be

> correct decision?

 

Think about this for a sec. One WSGI process (thread) does nothing else but handle request that comes in, and send the response. How is it supposed to know about the other requests/responses?

 

> Maybe there is a better way for monitor web server events?

 

Plenty. You can get very close to the stack:

http://uwsgi-docs.readthedocs.io/en/latest/LogEncoders.html

 

To full 3rd-party:

https://docs.newrelic.com/docs/alerts/new-relic-alerts/

 

There's an entire industry section devoted to this kind of thing. It's best to look there and not in the web framework. Chances are your admins already have some sort of monitoring in place, so look for something that ties in (can be tied in) with that.

--

Melvyn Sopacua

Reply all
Reply to author
Forward
0 new messages