几天来,我一直在努力将仪表板应用程序部署到Heroku。收到错误H13和H10,以前有人见过这些错误吗?我的目录按照破折号说明-https://dash.plotly.com/deployment。刚刚失去至于什么代码的含义,从Heroku的网站,H13“时,在您的Web测功机的过程接受连接抛出,但随后关闭套接字不写任何东西给它”,而H10是一个崩溃的应用程序。我正在努力缩小问题的出处,因为该应用程序在本地运行良好,部署时崩溃。
感谢任何帮助,欢呼!
我的python代码的相关位:
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
server = app.server
server.secret_key = os.environ.get('secret_key', 'secret')
if __name__ == '__main__':
app.run_server(port=int(os.environ.get("PORT", 14094)),debug=True)
和Heroku日志:
(venv)(基本)PhilippsMacBook:project philippevo $ heroku logs --tail 2020-08-08T01:56:33.748377 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py”, 583行,在spawn_worker 2020-08-08T01:56:33.748377 + 00:00 app [web.1]中: worker.init_process()2020-08-08T01:56:33.748378 + 00:00 app [web.1]: 文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py”, 第119行,位于init_process 2020-08-08T01:56:33.748378 + 00:00 app [web.1]中: self.load_wsgi()2020-08-08T01:56:33.748378 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py”, 第144行,在load_wsgi 2020-08-08T01:56:33.748379 + 00:00 app [web.1]中: self.wsgi = self.app.wsgi()2020-08-08T01:56:33.748379 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py”, wsgi 2020-08-08T01:56:33.748380 + 00:00 app [web.1]中的第67行: self.callable = self.load()2020-08-08T01:56:33.748380 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py”, 第49行,正在加载2020-08-08T01:56:33.748381 + 00:00 app [web.1]:返回 self.load_wsgiapp()2020-08-08T01:56:33.748381 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py”, 第39行,在load_wsgiapp 2020-08-08T01:56:33.748381 + 00:00 app [web.1]中: 返回util.import_app(self.app_uri)2020-08-08T01:56:33.748382 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py”, 在import_app 2020-08-08T01:56:33.748382 + 00:00 app [web.1]中的第358行: mod = importlib.import_module(模块)2020-08-08T01:56:33.748383 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/importlib/init.py”,第127行, 在import_module 2020-08-08T01:56:33.748383 + 00:00 app [web.1]中:返回 _bootstrap._gcd_import(名称[级别:],程序包,级别)2020-08-08T01:56:33.748384 + 00:00 app [web.1]:文件“”,行1006,在_gcd_import中 2020-08-08T01:56:33.748384 + 00:00 app [web.1]:文件“”,第983行,位于_find_and_load中 2020-08-08T01:56:33.748384 + 00:00 app [web.1]:文件“”,第967行,处于_find_and_load_unlocked状态 2020-08-08T01:56:33.748385 + 00:00 app [web.1]:文件“”,第677行,在_load_unlocked中 2020-08-08T01:56:33.748385 + 00:00 app [web.1]:文件“”,第728行,在exec_module中 2020-08-08T01:56:33.748386 + 00:00 app [web.1]:文件“”,第219行,在_call_with_frames_removed中 2020-08-08T01:56:33.748386 + 00:00 app [web.1]:文件“ /app/app.py”,行 108,在2020-08-08T01:56:33.748387 + 00:00 app [web.1]:与 open('../ j3.json','w')as jsonFile:2020-08-08T01:56:33.748387 + 00:00 app [web.1]:OSError:[Errno 30]只读文件系统:'../j3.json' 2020-08-08T01:56:33.748388 + 00:00 app [web.1]:[2020-08-08 01:56:33 +0000] [10] [INFO]工人退出(pid:10)2020-08-08T01:56:34.088120 + 00:00 app [web.1]:[2020-08-08 01:56:34 +0000] [4] [INFO]关机:Master 2020-08-08T01:56:34.088197 + 00:00 app [web.1]:[2020-08-08 01:56:34 +0000] [4] [INFO]原因:工作者无法启动。 2020-08-08T01:56:34.180208 + 00:00 heroku [web.1]:进程退出 状态3 2020-08-08T01:56:34.219066 + 00:00 heroku [web.1]:状态已更改 从直到崩溃2020-08-08T01:56:34.221665 + 00:00 heroku [web.1]: 状态从崩溃变为开始 2020-08-08T01:56:47.171855 + 00:00 heroku [web.1]:启动过程 命令
gunicorn app:server
2020-08-08T01:56:49.528287 + 00:00 应用程式[web.1]:[2020-08-08 01:56:49 +0000] [4] [INFO]开始 20.0.4 2020-08-08T01:56:49.528948 + 00:00 app [web.1]:[2020-08-08 01:56:49 +0000] [4] [INFO]聆听:{{3} }(4) 2020-08-08T01:56:49.529035 + 00:00 app [web.1]:[2020-08-08 01:56:49 +0000] [4] [INFO]使用worker:同步2020-08-08T01:56:49.533375 + 00:00 app [web.1]:[2020-08-08 01:56:49 +0000] [10] [INFO]引导工人 与pid:10 2020-08-08T01:56:49.617401 + 00:00 heroku [web.1]:状态 从开始更改为2020-08-08T01:56:49.634213 + 00:00 app [web.1]:[2020-08-08 01:56:49 +0000] [11] [INFO]正在引导工作程序 与pid:11 2020-08-08T01:56:55.550330 + 00:00 app [web.1]:[2020-08-08 01:56:55 +0000] [11] [错误]工作进程异常 2020-08-08T01:56:55.550352 + 00:00 app [web.1]:追溯(最新 最后调用):2020-08-08T01:56:55.550353 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py”, 583行,在spawn_worker 2020-08-08T01:56:55.550356 + 00:00 app [web.1]中: worker.init_process()2020-08-08T01:56:55.550356 + 00:00 app [web.1]: 文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py”, 第119行,在init_process 2020-08-08T01:56:55.550357 + 00:00 app [web.1]中: self.load_wsgi()2020-08-08T01:56:55.550357 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py”, 第144行,在load_wsgi 2020-08-08T01:56:55.550358 + 00:00 app [web.1]中: self.wsgi = self.app.wsgi()2020-08-08T01:56:55.550359 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py”, wsgi 2020-08-08T01:56:55.550359 + 00:00 app [web.1]中的第67行: self.callable = self.load()2020-08-08T01:56:55.550360 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py”, 第49行,正在加载2020-08-08T01:56:55.550360 + 00:00 app [web.1]:返回 self.load_wsgiapp()2020-08-08T01:56:55.550360 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py”, 第39行,在load_wsgiapp 2020-08-08T01:56:55.550361 + 00:00 app [web.1]中: 返回util.import_app(self.app_uri)2020-08-08T01:56:55.550361 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py”, 358行,位于import_app 2020-08-08T01:56:55.550361 + 00:00 app [web.1]中: mod = importlib.import_module(模块)2020-08-08T01:56:55.550362 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/importlib/init.py”,第127行, 在import_module 2020-08-08T01:56:55.550363 + 00:00 app [web.1]中:返回 _bootstrap._gcd_import(名称[级别:],程序包,级别)2020-08-08T01:56:55.550364 + 00:00 app [web.1]:文件“”,行1006,在_gcd_import中 2020-08-08T01:56:55.550364 + 00:00 app [web.1]:文件“”,第983行,位于_find_and_load中 2020-08-08T01:56:55.550364 + 00:00 app [web.1]:文件“”,第967行,处于_find_and_load_unlocked状态 2020-08-08T01:56:55.550365 + 00:00 app [web.1]:文件“”,第677行,在_load_unlocked中 2020-08-08T01:56:55.550365 + 00:00 app [web.1]:文件“”,第728行,在exec_module中 2020-08-08T01:56:55.550365 + 00:00 app [web.1]:文件“”,第219行,_call_with_frames_removed 2020-08-08T01:56:55.550366 + 00:00 app [web.1]:文件“ /app/app.py”,行 108,在2020-08-08T01:56:55.550366 + 00:00 app [web.1]: open('../ j3.json','w')as jsonFile:2020-08-08T01:56:55.550367 + 00:00 app [web.1]:OSError:[Errno 30]只读文件系统:'../j3.json' 2020-08-08T01:56:55.550807 + 00:00 app [web.1]:[2020-08-08 01:56:55 +0000] [11] [INFO]工人退出(pid:11)2020-08-08T01:56:55.586355 + 00:00 app [web.1]:[2020-08-08 01:56:55 +0000] [10] [错误]工作进程2020-08-08T01:56:55.586357 + 00:00应用程序[web.1]中的异常:追溯(最新 最后调用):2020-08-08T01:56:55.586358 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py”, 583行,在spawn_worker 2020-08-08T01:56:55.586359 + 00:00 app [web.1]中: worker.init_process()2020-08-08T01:56:55.586359 + 00:00 app [web.1]: 文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py”, 第119行,在init_process 2020-08-08T01:56:55.586359 + 00:00 app [web.1]中: self.load_wsgi()2020-08-08T01:56:55.586360 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py”, 第144行,在load_wsgi 2020-08-08T01:56:55.586360 + 00:00 app [web.1]中: self.wsgi = self.app.wsgi()2020-08-08T01:56:55.586361 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py”, wsgi 2020-08-08T01:56:55.586361 + 00:00 app [web.1]中的第67行: self.callable = self.load()2020-08-08T01:56:55.586362 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py”, 第49行,正在加载2020-08-08T01:56:55.586362 + 00:00 app [web.1]:返回 self.load_wsgiapp()2020-08-08T01:56:55.586362 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py”, 第39行,在load_wsgiapp 2020-08-08T01:56:55.586363 + 00:00 app [web.1]中: 返回util.import_app(self.app_uri)2020-08-08T01:56:55.586363 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py”, 358行,位于import_app 2020-08-08T01:56:55.586364 + 00:00 app [web.1]中: mod = importlib.import_module(模块)2020-08-08T01:56:55.586364 + 00:00 app [web.1]:文件 “ /app/.heroku/python/lib/python3.7/importlib/init.py”,第127行, 在import_module 2020-08-08T01:56:55.586365 + 00:00 app [web.1]中:返回 _bootstrap._gcd_import(名称[级别:],程序包,级别)2020-08-08T01:56:55.586365 + 00:00 app [web.1]:文件“”,行1006,在_gcd_import中 2020-08-08T01:56:55.586366 + 00:00 app [web.1]:文件“”,第983行,位于_find_and_load中 2020-08-08T01:56:55.586366 + 00:00 app [web.1]:文件“”,第967行,处于_find_and_load_unlocked状态 2020-08-08T01:56:55.586366 + 00:00 app [web.1]:文件“”,第677行,在_load_unlocked中 2020-08-08T01:56:55.586367 + 00:00 app [web.1]:文件“”,第728行,在exec_module中 2020-08-08T01:56:55.586367 + 00:00 app [web.1]:文件“”,第219行,在_call_with_frames_removed中 2020-08-08T01:56:55.586368 + 00:00 app [web.1]:文件“ /app/app.py”,行 108,在2020-08-08T01:56:55.586368 + 00:00 app [web.1]: open('../ j3.json','w')as jsonFile:2020-08-08T01:56:55.586368 + 00:00 app [web.1]:OSError:[Errno 30]只读文件系统:'../j3.json' 2020-08-08T01:56:55.586672 + 00:00 app [web.1]:[2020-08-08 01:56:55 +0000] [10] [INFO]工人退出(pid:10)2020-08-08T01:56:55.825800 + 00:00 heroku [router]:at =错误代码= H13 desc =“连接已关闭但无响应” method = GET path =“ /” host = dash-casual.herokuapp.com request_id = 5b7cb7c7-5999-406e-94d8-f43422bbdef2 fwd =“ 76.126.73.6” dyno = web.1 connect = 8ms服务= 1718ms status = 503字节= 0 协议= https 2020-08-08T01:56:55.927014 + 00:00 app [web.1]: [2020-08-08 01:56:55 +0000] [4] [INFO]关机:大师 2020-08-08T01:56:55.927155 + 00:00 app [web.1]:[2020-08-08 01:56:55 +0000] [4] [INFO]原因:工作者无法启动。 2020-08-08T01:56:56.005161 + 00:00 heroku [web.1]:进程退出 状态3