gpt4 book ai didi

python - Django Gunicorn worker 无法启动

转载 作者:太空狗 更新时间:2023-10-30 03:01:01 27 4
gpt4 key购买 nike

我有一个 Django 应用程序,我正在尝试使用 Gunicorn 在 Ubuntu VPS 上设置,但在运行 gunicorn project:application -b myip:8000 时遇到错误。这是结果的输出:

Traceback (most recent call last):
File "/home/user/project/env/bin/gunicorn", line 11, in <module>
sys.exit(run())
File "/home/user/project/env/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/home/user/project/env/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 185, in run
super(Application, self).run()
File "/home/user/project/env/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 71, in run
Arbiter(self).run()
File "/home/user/project/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 169, in run
self.manage_workers()
File "/home/user/project/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 477, in manage_workers
self.spawn_workers()
File "/home/user/project/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 542, in spawn_workers
time.sleep(0.1 * random.random())
File "/home/user/project/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 209, in handle_chld
self.reap_workers()
File "/home/user/project/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 459, in reap_workers
raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

我在虚拟环境中使用 pip install gunicorn 安装了 Gunicorn。 wsgi.py 存在并包含 WSGI 应用程序“应用程序”。我似乎无法弄清楚问题是什么。任何帮助将不胜感激。

最佳答案

尝试以 ma​​nage.py runserver 运行您的应用程序,您在那里遇到一些错误,因此您的应用程序无法加载。

关于python - Django Gunicorn worker 无法启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27084889/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com