我刚刚将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
答案 0 :(得分:0)
尝试将您的Procfile更改为:
web: gunicorn dj_patt_check.wsgi