Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
478 views
in Technique[技术] by (71.8m points)

python - django: app crashed heroku[router]: at=error code=H10 desc="App crashed"

I am trying to host my first Django app on Heroku. But it is crashing and app isn't starting. Showing application error. I tried so many different ways but nothing is working at all. I also delete my .git folder and push many times, again crashing.

enter image description here

Here is my log file. In the last line of the log file, you can see the error message. Can anyone help me why my app is crashing and how to fix it? Thanks in advance.

user@Ubuntu:~/Documents/Webdev/PyShop$ heroku logs --tail

 ?   Warning: heroku update available from 7.47.6 to 7.47.7.
2021-01-08T14:12:50.803403+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
2021-01-08T14:12:50.803403+00:00 app[web.1]: return WSGIHandler()
2021-01-08T14:12:50.803403+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 127, in __init__
2021-01-08T14:12:50.803404+00:00 app[web.1]: self.load_middleware()
2021-01-08T14:12:50.803404+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/django/core/handlers/base.py", line 40, in load_middleware
2021-01-08T14:12:50.803405+00:00 app[web.1]: middleware = import_string(middleware_path)
2021-01-08T14:12:50.803405+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/django/utils/module_loading.py", line 17, in import_string
2021-01-08T14:12:50.803406+00:00 app[web.1]: module = import_module(module_path)
2021-01-08T14:12:50.803406+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/importlib/__init__.py", line 127, in import_module
2021-01-08T14:12:50.803407+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-01-08T14:12:50.803407+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
2021-01-08T14:12:50.803407+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2021-01-08T14:12:50.803408+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
2021-01-08T14:12:50.803408+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2021-01-08T14:12:50.803408+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
2021-01-08T14:12:50.803409+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2021-01-08T14:12:50.803409+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
2021-01-08T14:12:50.803409+00:00 app[web.1]: ModuleNotFoundError: No module named 'whitenoise'
2021-01-08T14:12:50.814880+00:00 app[web.1]: [2021-01-08 14:12:50 +0000] [9] [INFO] Worker exiting (pid: 9)
2021-01-08T14:12:51.326638+00:00 app[web.1]: [2021-01-08 14:12:51 +0000] [10] [ERROR] Exception in worker process
2021-01-08T14:12:51.326660+00:00 app[web.1]: Traceback (most recent call last):
2021-01-08T14:12:51.326662+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2021-01-08T14:12:51.326663+00:00 app[web.1]: worker.init_process()
2021-01-08T14:12:51.326663+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process
2021-01-08T14:12:51.326663+00:00 app[web.1]: self.load_wsgi()
2021-01-08T14:12:51.326664+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
2021-01-08T14:12:51.326664+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-01-08T14:12:51.326665+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-01-08T14:12:51.326666+00:00 app[web.1]: self.callable = self.load()
2021-01-08T14:12:51.326666+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
2021-01-08T14:12:51.326666+00:00 app[web.1]: return self.load_wsgiapp()
2021-01-08T14:12:51.326667+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
2021-01-08T14:12:51.326667+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-01-08T14:12:51.326668+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
2021-01-08T14:12:51.326668+00:00 app[web.1]: mod = importlib.import_module(module)
2021-01-08T14:12:51.326668+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/importlib/__init__.py", line 127, in import_module
2021-01-08T14:12:51.326669+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-01-08T14:12:51.326670+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
2021-01-08T14:12:51.326670+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2021-01-08T14:12:51.326670+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
2021-01-08T14:12:51.326671+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
2021-01-08T14:12:51.326671+00:00 app[web.1]: File "<frozen importlib._bootstrap_external>", line 783, in exec_module
2021-01-08T14:12:51.326671+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2021-01-08T14:12:51.326672+00:00 app[web.1]: File "/app/pyshop/wsgi.py", line 16, in <module>
2021-01-08T14:12:51.326672+00:00 app[web.1]: application = get_wsgi_application()
2021-01-08T14:12:51.326673+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
2021-01-08T14:12:51.326673+00:00 app[web.1]: return WSGIHandler()
2021-01-08T14:12:51.326673+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 127, in __init__
2021-01-08T14:12:51.326674+00:00 app[web.1]: self.load_middleware()
2021-01-08T14:12:51.326675+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/django/core/handlers/base.py", line 40, in load_middleware
2021-01-08T14:12:51.326675+00:00 app[web.1]: middleware = import_string(middleware_path)
2021-01-08T14:12:51.326675+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/django/utils/module_loading.py", line 17, in import_string
2021-01-08T14:12:51.326676+00:00 app[web.1]: module = import_module(module_path)
2021-01-08T14:12:51.326676+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/importlib/__init__.py", line 127, in import_module
2021-01-08T14:12:51.326676+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-01-08T14:12:51.326677+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
2021-01-08T14:12:51.326677+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2021-01-08T14:12:51.326677+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
2021-01-08T14:12:51.326678+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2021-01-08T14:12:51.326678+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
2021-01-08T14:12:51.326679+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2021-01-08T14:12:51.326679+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
2021-01-08T14:12:51.326679+00:00 app[web.1]: ModuleNotFoundError: No module named 'whitenoise'
2021-01-08T14:12:51.329170+00:00 app[web.1]: [2021-01-08 14:12:51 +0000] [10] [INFO] Worker exiting (pid: 10)
2021-01-08T14:12:51.759809+00:00 app[web.1]: Traceback (most recent call last):
2021-01-08T14:12:51.759893+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 209, in run
2021-01-08T14:12:51.760615+00:00 app[web.1]: self.sleep()
2021-01-08T14:12:51.760651+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 357, in sleep
2021-01-08T14:12:51.761212+00:00 app[web.1]: ready = select.select([self.PIPE[0]], [], [], 1.0)
2021-01-08T14:12:51.761261+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
2021-01-08T14:12:51.761712+00:00 app[web.1]: self.reap_workers()
2021-01-08T14:12:51.761745+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2021-01-08T14:12:51.762385+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2021-01-08T14:12:51.762683+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2021-01-08T14:12:51.762709+00:00 app[web.1]: 
2021-01-08T14:12:51.762710+00:00 app[web.1]: During handling of the above exception, another exception occurred:
2021-01-08T14:12:51.762710+00:00 app[web.1]: 
2021-01-08T14:12:51.762736+00:00 app[web.1]: Traceback (most recent call last):
2021-01-08T14:12:51.762767+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>
2021-01-08T14:12:51.763129+00:00 app[web.1]: sys.exit(run())
2021-01-08T14:12:51.763193+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 58, in run
2021-01-08T14:12:51.763572+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2021-01-08T14:12:51.763628+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/base.py", line 228, in run
2021-01-08T14:12:51.764105+00:00 app[web.1]: super().run()
2021-01-08T14:12:51.764151+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/base.py", line 72, in run
2021-01-08T14:12:51.764525+00:00 app[web.1]: Arbiter(self).run()
2021-01-08T14:12:51.764558+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 229, in run
2021-01-08T14:12:51.764969+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2021-01-08T14:12:51.765002+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 342, in halt
2021-01-08T14:12:51.765592+00:00 app[web.1]: self.stop()
2021-01-08T14:12:51.765622+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 393, in stop
2021-01-08T14:12:51.766177+00:00 app[web.1]: time.sleep(0.1)
2021-01-08T14:12:51.766208+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
2021-01-08T14:12:51.766669+00:00 app[web.1]: self.reap_workers()
2021-01-08T14:12:51.766701+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2021-01-08T14:12:51.767310+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...