【发布时间】:2019-05-07 23:00:44
【问题描述】:
我刚刚将我的 Django 和 spaCy 应用程序部署到 Heroku,但它没有运行。我检查了日志,发现错误:gunicorn.errors.HaltServer:
这是我的 Procfile:
web: gunicorn dj_patt_check.wsgi:application
这是我的 wsgi.py 文件:
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dj_patt_check.settings')
application = get_wsgi_application()
我该如何解决这个问题?我的 gunicorn 版本是 19.9.0。
详细日志在这里:
2019-05-08T09:53:55.799760+00:00 app[web.1]: time.sleep(0.1)
2019-05-08T09:53:55.799803+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 245, in handle_chld
2019-05-08T09:53:55.800081+00:00 app[web.1]: self.reap_workers()
2019-05-08T09:53:55.800116+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2019-05-08T09:53:55.800536+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2019-05-08T09:53:55.800583+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2019-05-08T09:53:55.900758+00:00 heroku[web.1]: State changed from up to crashed
2019-05-08T09:53:55.882217+00:00 heroku[web.1]: Process exited with status 1
2019-05-08T09:56:38.202619+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=dialektic.herokuapp.com request_id=2a28e008-998b-4b45-acd9-c898f7305aef fwd="49.14.159.39" dyno= connect= service= status=503 bytes= protocol=https
2019-05-08T09:56:49.324440+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=dialektic.herokuapp.com request_id=45bc414d-e34d-415d-8985-43d4a30b0475 fwd="49.14.159.39" dyno= connect= service= status=503 bytes= protocol=https
【问题讨论】:
-
显示该回溯的其余部分。
-
@DanielRoseman 我刚刚用所需信息更新了问题。
标签: python django heroku gunicorn