python - 成功构建后使用 Heroku 以错误状态部署破折号
问题描述
我使用 Python 和 Dash 编写了一个简单的仪表板。我尝试在 Heroku 中部署它并成功构建,但随后应用程序处于错误状态。
以下是日志文件的一部分(它太长但我可以提供帮助!)。我无法理解错误,我将完整的日志粘贴到此处。
heroku logs --tail
› Warning: heroku update available from 7.35.0 to 7.42.1.
2020-06-08T21:50:02.817849+00:00 app[web.1]: self.sleep()
2020-06-08T21:50:02.817885+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 360, in sleep
2020-06-08T21:50:02.818331+00:00 app[web.1]: ready = select.select([self.PIPE[0]], [], [], 1.0)
2020-06-08T21:50:02.818366+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 245, in handle_chld
2020-06-08T21:50:02.818656+00:00 app[web.1]: self.reap_workers()
2020-06-08T21:50:02.818694+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 528, in reap_workers
2020-06-08T21:50:02.819143+00:00 app[web.1]: raise HaltServer(reason, self.APP_LOAD_ERROR)
2020-06-08T21:50:02.819238+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'App failed to load.' 4>
2020-06-08T21:50:02.819239+00:00 app[web.1]:
2020-06-08T21:50:02.819240+00:00 app[web.1]: During handling of the above exception, another exception occurred:
2020-06-08T21:50:02.819240+00:00 app[web.1]:
2020-06-08T21:50:02.819245+00:00 app[web.1]: Traceback (most recent call last):
2020-06-08T21:50:02.819272+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 8, in <module>
2020-06-08T21:50:02.819419+00:00 app[web.1]: sys.exit(run())
2020-06-08T21:50:02.819420+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 61, in run
2020-06-08T21:50:02.819576+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2020-06-08T21:50:02.819580+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 223, in run
2020-06-08T21:50:02.819779+00:00 app[web.1]: super(Application, self).run()
2020-06-08T21:50:02.819785+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 72, in run
2020-06-08T21:50:02.819951+00:00 app[web.1]: Arbiter(self).run()
2020-06-08T21:50:02.819956+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 232, in run
2020-06-08T21:50:02.820155+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2020-06-08T21:50:02.820160+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 345, in halt
2020-06-08T21:50:02.820395+00:00 app[web.1]: self.stop()
2020-06-08T21:50:02.820400+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 393, in stop
解决方案
按照此说明,我必须添加以下内容:
server = app.server
推荐阅读
- php - 我正在尝试使用正则表达式在 Web url 中捕获数据
- python - 如何使用python连接到sqlite3数据库
- asp.net-core - Mass Transit + Azure Service Bus:使用某些类型的消息而不创建相应的主题
- javascript - 为什么我的 API JSON 响应没有显示?
- angular - Chart.js core.js:6162 ERROR 错误:“line”不是注册控制器
- .net-core - .NET 5 WPF EntityFramework 和 SQL 精简版
- c++ - 未指定 CLion 目标 - 无目标
- javascript - 如何在按钮单击时从复选框获取值到 php 数组?
- r - 多次评估 R 中的积分
- javascript - 多个请求的节点js中MySql数据更新和选择同步问题