尝试将我的仪表板仪表板部署在Heroku上,但出现此错误:
2020-02-12T20:06:28.207580+00:00 heroku[web.1]: Starting process with command `gunicorn app:server`
2020-02-12T20:06:34.455328+00:00 heroku[web.1]: State changed from starting to up
2020-02-12T20:07:03.644528+00:00 app[web.1]: WORKER TIMEOUT (pid:10)
2020-02-12T20:07:04.647635+00:00 app[web.1]: WORKER TIMEOUT (pid:11)
2020-02-12T20:07:15.625829+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=kalinaxchallenge.herokuapp.com request_id=f2e2ef3e-c454-45fc-a5f0-f3e4fa1f59e1 fwd="197.221.254.77" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0 protocol=https
2020-02-12T20:07:22.939065+00:00 app[web.1]: Failed to find application: 'app'
2020-02-12T20:07:28.354927+00:00 app[web.1]: Failed to find application: 'app'
2020-02-12T20:07:29.073920+00:00 heroku[web.1]: State changed from up to crashed
2020-02-12T20:07:28.813680+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/favicon.ico" host=kalinaxchallenge.herokuapp.com request_id=7c1977fe-5495-4327-990f-68a433ed2269 fwd="197.221.254.77" dyno=web.1 connect=1ms service=11173ms status=503 bytes=0 protocol=https
2020-02-12T20:07:29.059525+00:00 heroku[web.1]: Process exited with status 4
我的procfile:
web: gunicorn app:server
和我的要求。txt
dash_core_components==1.5.1
dash==1.6.1
dash_html_components==1.0.2
pandas==0.25.2
plotly==4.2.1
gunicorn==19.0.0
numpy==1.17.4
和我的app.py
if __name__ == '__main__':
app.run_server(debug=True)
该应用在本地完美运行
似乎是一个奇怪的错误消息,至少对我来说,因为这是我项目的结构
Procfile
app.json
app.py
dataset1
dataset2
requirements.txt
我不确定为什么在正确的位置找不到应用程序
注意:我没有名为app的文件夹并删除了app.json
答案 0 :(得分:0)
我通过将此行添加到我的app.py中解决了此问题
server = app.server