我尝试在Heroku上部署一个Web应用程序,并使用Dash制作的应用程序。我已经成功地在Heroku上部署了几个示例应用程序,并且我已经成功地在本地服务器上部署了我的应用程序。当我尝试在Heroku上部署我自己的应用程序时,问题出现了。我已经尝试了几种不同的方法在Heroku上部署,但尽管成功构建,我仍然继续得到“应用程序错误”。我已经包括了我的日志,但可以使用帮助了解他们。我仍然是相当新的这一点,所以任何见解将不胜感激。
2018-06-14T06:16:06.479983+00:00 app[web.1]: self.reap_workers()
2018-06-14T06:16:06.479989+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2018-06-14T06:16:06.480336+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2018-06-14T06:16:06.480369+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2018-06-14T06:16:06.571040+00:00 heroku[web.1]: State changed from up to crashed
2018-06-14T06:16:06.555492+00:00 heroku[web.1]: Process exited with status 1
2018-06-14T06:20:34.738228+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=builddlrapp.herokuapp.com request_id=75e9c068-72cb-41e3-8bbd-c6790c722f8e fwd="137.158.71.91" dyno= connect= service= status=503 bytes= protocol=https
2018-06-14T06:20:38.238293+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=builddlrapp.herokuapp.com request_id=c0905560-3e86-4059-918a-3c795824325c fwd="137.158.71.91" dyno= connect= service= status=503 bytes= protocol=https
2018-06-14T06:31:25.832995+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=builddlrapp.herokuapp.com request_id=3d771909-ec4e-4312-9567-6653b443ef6f fwd="137.158.71.91" dyno= connect= service= status=503 bytes= protocol=https
2018-06-14T06:31:26.464840+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=builddlrapp.herokuapp.com request_id=b1ae29be-3f08-4d94-b669-243b5a303a5b fwd="137.158.71.91" dyno= connect= service= status=503 bytes= protocol=https
2018-06-14T06:34:44.629354+00:00 heroku[web.1]: State changed from crashed to starting
2018-06-14T06:34:53.953676+00:00 heroku[web.1]: Starting process with command `gunicorn app:server`
2018-06-14T06:34:55.963096+00:00 app[web.1]: [2018-06-14 06:34:55 +0000] [4] [INFO] Starting gunicorn 19.8.1
2018-06-14T06:34:55.963587+00:00 app[web.1]: [2018-06-14 06:34:55 +0000] [4] [INFO] Listening at: http://0.0.0.0:41360 (4)
2018-06-14T06:34:55.963682+00:00 app[web.1]: [2018-06-14 06:34:55 +0000] [4] [INFO] Using worker: sync
2018-06-14T06:34:55.967329+00:00 app[web.1]: [2018-06-14 06:34:55 +0000] [8] [INFO] Booting worker with pid: 8
2018-06-14T06:34:56.010075+00:00 app[web.1]: [2018-06-14 06:34:56 +0000] [9] [INFO] Booting worker with pid: 9
2018-06-14T06:34:56.449927+00:00 heroku[web.1]: State changed from starting to up
2018-06-14T06:34:57.353527+00:00 app[web.1]: [2018-06-14 06:34:57 +0000] [9] [ERROR] Exception in worker process
2018-06-14T06:34:57.353564+00:00 app[web.1]: Traceback (most recent call last):
2018-06-14T06:34:57.353566+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2018-06-14T06:34:57.353567+00:00 app[web.1]: worker.init_process()
2018-06-14T06:34:57.353568+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
2018-06-14T06:34:57.353569+00:00 app[web.1]: self.load_wsgi()
2018-06-14T06:34:57.353570+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
2018-06-14T06:34:57.353571+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2018-06-14T06:34:57.353573+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2018-06-14T06:34:57.353574+00:00 app[web.1]: self.callable = self.load()
2018-06-14T06:34:57.353576+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
2018-06-14T06:34:57.353577+00:00 app[web.1]: return self.load_wsgiapp()
2018-06-14T06:34:57.353578+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
2018-06-14T06:34:57.353579+00:00 app[web.1]: return util.import_app(self.app_uri)
2018-06-14T06:34:57.353580+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
2018-06-14T06:34:57.353581+00:00 app[web.1]: __import__(module)
2018-06-14T06:34:57.353582+00:00 app[web.1]: File "/app/app.py", line 12, in <module>
2018-06-14T06:34:57.353583+00:00 app[web.1]: import dash_table_experiments as dt
2018-06-14T06:34:57.353590+00:00 app[web.1]: ModuleNotFoundError: No module named 'dash_table_experiments'
2018-06-14T06:34:57.355356+00:00 app[web.1]: [2018-06-14 06:34:57 +0000] [9] [INFO] Worker exiting (pid: 9)
2018-06-14T06:34:57.358463+00:00 app[web.1]: [2018-06-14 06:34:57 +0000] [8] [ERROR] Exception in worker process
2018-06-14T06:34:57.358465+00:00 app[web.1]: Traceback (most recent call last):
2018-06-14T06:34:57.358466+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2018-06-14T06:34:57.358467+00:00 app[web.1]: worker.init_process()
2018-06-14T06:34:57.358468+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
2018-06-14T06:34:57.358469+00:00 app[web.1]: self.load_wsgi()
2018-06-14T06:34:57.358471+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
2018-06-14T06:34:57.358472+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2018-06-14T06:34:57.358473+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2018-06-14T06:34:57.358474+00:00 app[web.1]: self.callable = self.load()
2018-06-14T06:34:57.358475+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
2018-06-14T06:34:57.358476+00:00 app[web.1]: return self.load_wsgiapp()
2018-06-14T06:34:57.358477+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
2018-06-14T06:34:57.358479+00:00 app[web.1]: return util.import_app(self.app_uri)
2018-06-14T06:34:57.358480+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
2018-06-14T06:34:57.358481+00:00 app[web.1]: __import__(module)
2018-06-14T06:34:57.358482+00:00 app[web.1]: File "/app/app.py", line 12, in <module>
2018-06-14T06:34:57.358483+00:00 app[web.1]: import dash_table_experiments as dt
2018-06-14T06:34:57.358487+00:00 app[web.1]: ModuleNotFoundError: No module named 'dash_table_experiments'
2018-06-14T06:34:57.360264+00:00 app[web.1]: [2018-06-14 06:34:57 +0000] [8] [INFO] Worker exiting (pid: 8)
2018-06-14T06:34:57.415375+00:00 app[web.1]: Traceback (most recent call last):
2018-06-14T06:34:57.415384+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 210, in run
2018-06-14T06:34:57.415674+00:00 app[web.1]: self.sleep()
2018-06-14T06:34:57.415677+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 360, in sleep
2018-06-14T06:34:57.415899+00:00 app[web.1]: ready = select.select([self.PIPE[0]], [], [], 1.0)
2018-06-14T06:34:57.415901+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 245, in handle_chld
2018-06-14T06:34:57.416091+00:00 app[web.1]: self.reap_workers()
2018-06-14T06:34:57.416095+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2018-06-14T06:34:57.416352+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2018-06-14T06:34:57.416387+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2018-06-14T06:34:57.416389+00:00 app[web.1]:
2018-06-14T06:34:57.416390+00:00 app[web.1]: During handling of the above exception, another exception occurred:
2018-06-14T06:34:57.416391+00:00 app[web.1]:
2018-06-14T06:34:57.416394+00:00 app[web.1]: Traceback (most recent call last):
2018-06-14T06:34:57.416395+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>
2018-06-14T06:34:57.416514+00:00 app[web.1]: sys.exit(run())
2018-06-14T06:34:57.416516+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 61, in run
2018-06-14T06:34:57.416632+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2018-06-14T06:34:57.416633+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 223, in run
2018-06-14T06:34:57.416796+00:00 app[web.1]: super(Application, self).run()
2018-06-14T06:34:57.416797+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 72, in run
2018-06-14T06:34:57.416923+00:00 app[web.1]: Arbiter(self).run()
2018-06-14T06:34:57.416924+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 232, in run
2018-06-14T06:34:57.417088+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2018-06-14T06:34:57.417089+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 345, in halt
2018-06-14T06:34:57.417316+00:00 app[web.1]: self.stop()
2018-06-14T06:34:57.417341+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 393, in stop
2018-06-14T06:34:57.417542+00:00 app[web.1]: time.sleep(0.1)
2018-06-14T06:34:57.417543+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 245, in handle_chld
2018-06-14T06:34:57.417703+00:00 app[web.1]: self.reap_workers()
2018-06-14T06:34:57.417705+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2018-06-14T06:34:57.417949+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2018-06-14T06:34:57.417969+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2018-06-14T06:34:57.482436+00:00 heroku[web.1]: Process exited with status 1
2018-06-14T06:34:57.498547+00:00 heroku[web.1]: State changed from up to crashed
字符串
4条答案
按热度按时间igetnqfo1#
我在应用程序中包含了一个requirements.txt文件,里面包含了我需要的所有软件包,并通过命令行使用git推送到heroku,让它工作。也就是说,很难说你在虚拟环境中通过pip安装了软件包后发生了什么。软件包仍然没有加载吗?
以下是我在miniconda环境下的requirements.txt文件中的内容。它可能比你的应用所需的更多:
字符串
2hh7jdfx2#
缺少'dash_table_experiments',需要将其添加到requirements.txt git add A- git commit -m 'modifications'
jc3wubiy3#
安装完丢失的模块后,您需要重新创建requirements.txt文件,其中包含:
字符串
然后提交新的更改并部署。
2ic8powd4#
你应该创建一个runtime.txt文件,并指出你在安装这些依赖时使用的Python。