7

安装版本

阿帕奇

  • 4月-1.6.5
  • apr-util-1.6.1
  • httpd-2.4.7
  • mod_wsgi-4.6.8
  • pcre-8.32

Python

  • 3.8.5

姜戈

  • 3.1.2

阿帕奇 http.conf

Listen 3600
WSGISocketPrefix /var/run/wsgi
<VirtualHost *:3600>
    WSGIDaemonProcess project_name display-name=project_name
    WSGIScriptAlias / /data/project_name/config/wsgi.py  process-group=api application-group=api
    ServerName project_name
    <Directory /data/project_name/config>
        Order allow,deny
        Allow from all
        Require all granted
        <Files wsgi.py>
            Require all granted
        </Files>
    </Directory>
</VirtualHost>

错误日志

Exception ignored in: <function Local.__del__ at 0x7fd675a70a60>
Traceback (most recent call last):
  File "/data/venv/api/lib/python3.8/site-packages/asgiref/local.py", line 96, in __del__
NameError: name 'TypeError' is not defined

上面的错误日志一遍又一遍地出现。
不知道为什么不使用asgi的时候会出现asgi相关的错误。

4

1 回答 1

0

我在日志中看到了相同的类似内容,仅在 apache 关闭期间(并因此重新启动)。在关闭 python 解释器时,后台线程可能仍在运行,正如几年前@GrahamDumpleton 在一个类似风格的问题(有不同的错误)中所回答的那样。请参阅NameError: name 'hasattr' is not defined - Python3.6、Django1.11、Ubuntu16-17、Apache2.4、mod_wsgi

于 2021-05-17T20:38:18.330 回答