繁体   English   中英

在 Elastic Beanstalk 上使用 Django 2.2 的 WSGI 错误

[英]WSGI error using Django 2.2 on Elastic Beanstalk

尝试访问部署到 AWS Elastic Beanstalk 的 Django 2.2 web 应用程序会出现 500 错误。 检查弹性豆茎日志时,会显示以下错误。

 mod_wsgi (pid=3388): Target WSGI script '/opt/python/current/app/app_name/wsgi.py' cannot be loaded as Python module.
 mod_wsgi (pid=3388): Exception occurred processing WSGI script '/opt/python/current/app/app_name/wsgi.py'.
 Traceback (most recent call last):
   File "/opt/python/current/app/app_name/wsgi.py", line 16, in <module>
     application = get_wsgi_application()
   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
     django.setup(set_prefix=False)
   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
     apps.populate(settings.INSTALLED_APPS)
   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/apps/registry.py", line 83, in populate
     raise RuntimeError("populate() isn't reentrant")
 RuntimeError: populate() isn't reentrant

这是因为 Django 2.2(在撰写本文时)与 EB 不兼容。

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html

Django 2.2 与 Elastic Beanstalk Python 3.6 平台不兼容。 最新的兼容版本是 Django 2.1。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM