我正在尝试使用 heroku 将我的 plotly 应用程序部署到网站。我按照以下步骤操作:
使用 pycharm 使用 Python 3.8 版本创建虚拟环境
安装了在虚拟环境中运行我的应用程序所需的所有必要库。分别是 Numpy、Plotly、Dash、Pandas=1.0.0 和 gunicorn
创建了一个包含以下内容的 .gitignore 文件:
6.. 使用 heroku cli 和 git 来构建和部署我的应用程序到服务器。该应用程序已成功部署,但是当我启动该应用程序时,它给了我一个错误。日志如图所示:
2021-01-07T07:32:47.773278+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 393, in stop
2021-01-07T07:32:47.773697+00:00 app[web.1]: time.sleep(0.1)
2021-01-07T07:32:47.773759+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
2021-01-07T07:32:47.774108+00:00 app[web.1]: self.reap_workers()
2021-01-07T07:32:47.774157+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2021-01-07T07:32:47.774678+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2021-01-07T07:32:47.774743+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2021-01-07T07:32:47.930226+00:00 heroku[web.1]: Process exited with status 1
2021-01-07T07:32:47.978712+00:00 heroku[web.1]: State changed from up to crashed
2021-01-07T07:32:48.514470+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=dashboard-1995.herokuapp.com request_id=a6a82e6b-0012-44d8-afb9-53f2976f5356 fwd="114.79.136.133" dyno=web.1 connect=1ms service= status=503 bytes= protocol=https
2021-01-07T07:49:30.057615+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=dashboard-1995.herokuapp.com request_id=5f577916-82cf-46c0-bd44-0310a16f24e8 fwd="18.212.132.42" dyno= connect= service= status=503 bytes= protocol=http