Apache 错误日志中出现未知 Django (Postgis) 异常,没有电子邮件报告

发布于 2024-11-30 16:45:30 字数 543 浏览 4 评论 0原文

我正在使用 Apache + mod_wsgi 运行多个 Django 站点。现在,我刚刚在 Apache 错误日志之一中看到以下错误:

[Mon Aug 22 16:12:01 2011] [error] Exception AttributeError: "'NoneType' object has no attribute 'finishGEOS_r'" in <bound method GEOSContextHandle.__del__ of <django.contrib.gis.geos.prototypes.threadsafe.GEOSContextHandle object at 0xb9641f0c>> ignored

奇怪的是,我根本没有从 Django 收到任何有关此异常的邮件错误报告(所有站点都以 DEBUG=false 运行并且ADMINS 列表中的正确邮件地址)。

有谁知道什么可能导致此错误? 尾随的 >> 是否ignored 表示异常被忽略,用户没有得到 HTTP 500 页面?

I am running several Django sites using Apache + mod_wsgi. Now, I've just seen the following error in one of the Apache error logs:

[Mon Aug 22 16:12:01 2011] [error] Exception AttributeError: "'NoneType' object has no attribute 'finishGEOS_r'" in <bound method GEOSContextHandle.__del__ of <django.contrib.gis.geos.prototypes.threadsafe.GEOSContextHandle object at 0xb9641f0c>> ignored

The strange thing is, that I don't get any mail error reports from Django at all concerning this exception (all the sites run with DEBUG=false and correct mail adresses in the ADMINS list).

Does anyone know what could cause this error?
Does the trailing >> ignored means that the exception is ignored and the user doesn't get a HTTP 500 page?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情仇皆在手 2024-12-07 16:45:30

我相信这只是一条 logging.error 消息,而不是 500

see
http://python.6.n6.nabble.com/Re-Django-13843-destroy-geom-filling-up-the-apache-error-logs-tt365140.html#none

如果您使用 Apache,错误日志无论如何都会告诉您该请求的 http 状态,以便您可以查看用户是否收到 500 错误?

I believe it's just a logging.error message rather than a 500

see
http://python.6.n6.nabble.com/Re-Django-13843-destroy-geom-filling-up-the-apache-error-logs-tt365140.html#none

if you're on Apache the error log should tell you the http status of that request anyway, so you can see if the user got a 500 error?

酒儿 2024-12-07 16:45:30

如果我的记忆不错,如果析构函数方法作为异常的副作用被调用,并且析构函数中发生了进一步的异常,那么Python将无法传播新的异常,因此Python会将其直接记录到stderr。最初的异常仍然是引发的异常。这就是为什么你不会看到后者被 Django 捕获并通过电子邮件发送到 ADMINS 列表等。

If my memory is good, if a destructor method is being invoked as a side effect of an exception, and a further exception occurs within the destructor then Python can't propagate the new one and so Python will log it itself direct to stderr. The original exception is then still the one that is raised. This is why you will not see the latter captured by Django and emailed out to ADMINS list etc.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文