Home > OS >  Heroku throwing error H10 for my Django site
Heroku throwing error H10 for my Django site

Time:01-17

I recently deployed my django site to heroku, but when I go to my site heroku site it tells me that there was an error and I should run heroku logs --tail. When I run it this is what I get:

2022-01-16T05:22:47.929147 00:00 heroku[web.1]: State changed from crashed to starting
2022-01-16T05:22:52.560445 00:00 heroku[web.1]: Starting process with command `gunicorn myproject.wsgi`
2022-01-16T05:22:54.004862 00:00 app[web.1]: [2022-01-16 05:22:54  0000] [4] [INFO] Starting gunicorn 20.1.0
2022-01-16T05:22:54.005301 00:00 app[web.1]: [2022-01-16 05:22:54  0000] [4] [INFO] Listening at: http://0.0.0.0:41179 (4)
2022-01-16T05:22:54.005342 00:00 app[web.1]: [2022-01-16 05:22:54  0000] [4] [INFO] Using worker: sync
2022-01-16T05:22:54.013916 00:00 app[web.1]: [2022-01-16 05:22:54  0000] [9] [INFO] Booting worker with pid: 9
2022-01-16T05:22:54.047924 00:00 app[web.1]: [2022-01-16 05:22:54  0000] [9] [ERROR] Exception in worker process
2022-01-16T05:22:54.047941 00:00 app[web.1]: Traceback (most recent call last):
2022-01-16T05:22:54.047945 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2022-01-16T05:22:54.047948 00:00 app[web.1]: worker.init_process()
2022-01-16T05:22:54.047948 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
2022-01-16T05:22:54.047949 00:00 app[web.1]: self.load_wsgi()
2022-01-16T05:22:54.047949 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2022-01-16T05:22:54.047949 00:00 app[web.1]: self.wsgi = self.app.wsgi()
2022-01-16T05:22:54.047953 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2022-01-16T05:22:54.047953 00:00 app[web.1]: self.callable = self.load()
2022-01-16T05:22:54.047953 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2022-01-16T05:22:54.047953 00:00 app[web.1]: return self.load_wsgiapp()
2022-01-16T05:22:54.047954 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2022-01-16T05:22:54.047954 00:00 app[web.1]: return util.import_app(self.app_uri)
2022-01-16T05:22:54.047954 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2022-01-16T05:22:54.047955 00:00 app[web.1]: mod = importlib.import_module(module)
2022-01-16T05:22:54.047955 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
2022-01-16T05:22:54.047955 00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2022-01-16T05:22:54.047955 00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2022-01-16T05:22:54.047956 00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2022-01-16T05:22:54.047956 00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
2022-01-16T05:22:54.047956 00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
2022-01-16T05:22:54.047956 00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2022-01-16T05:22:54.047957 00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2022-01-16T05:22:54.047957 00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
2022-01-16T05:22:54.047957 00:00 app[web.1]: ModuleNotFoundError: No module named 'myproject'
2022-01-16T05:22:54.050692 00:00 app[web.1]: [2022-01-16 05:22:54  0000] [9] [INFO] Worker exiting (pid: 9)
2022-01-16T05:22:54.053138 00:00 app[web.1]: [2022-01-16 05:22:54  0000] [10] [INFO] Booting worker with pid: 10
2022-01-16T05:22:54.056946 00:00 app[web.1]: [2022-01-16 05:22:54  0000] [10] [ERROR] Exception in worker process
2022-01-16T05:22:54.056947 00:00 app[web.1]: Traceback (most recent call last):
2022-01-16T05:22:54.056948 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2022-01-16T05:22:54.056948 00:00 app[web.1]: worker.init_process()
2022-01-16T05:22:54.056948 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
2022-01-16T05:22:54.056949 00:00 app[web.1]: self.load_wsgi()
2022-01-16T05:22:54.056949 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2022-01-16T05:22:54.056949 00:00 app[web.1]: self.wsgi = self.app.wsgi()
2022-01-16T05:22:54.056950 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2022-01-16T05:22:54.056950 00:00 app[web.1]: self.callable = self.load()
2022-01-16T05:22:54.056950 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2022-01-16T05:22:54.056951 00:00 app[web.1]: return self.load_wsgiapp()
2022-01-16T05:22:54.056951 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2022-01-16T05:22:54.056952 00:00 app[web.1]: return util.import_app(self.app_uri)
2022-01-16T05:22:54.056952 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2022-01-16T05:22:54.056952 00:00 app[web.1]: mod = importlib.import_module(module)
2022-01-16T05:22:54.056952 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
2022-01-16T05:22:54.056953 00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2022-01-16T05:22:54.056953 00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2022-01-16T05:22:54.056953 00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2022-01-16T05:22:54.056954 00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
2022-01-16T05:22:54.056954 00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
2022-01-16T05:22:54.056954 00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2022-01-16T05:22:54.056954 00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2022-01-16T05:22:54.056955 00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
2022-01-16T05:22:54.056955 00:00 app[web.1]: ModuleNotFoundError: No module named 'myproject'
2022-01-16T05:22:54.057129 00:00 app[web.1]: [2022-01-16 05:22:54  0000] [10] [INFO] Worker exiting (pid: 10)
2022-01-16T05:22:54.099506 00:00 app[web.1]: [2022-01-16 05:22:54  0000] [4] [WARNING] Worker with pid 9 was terminated due to signal 15
2022-01-16T05:22:54.199254 00:00 app[web.1]: [2022-01-16 05:22:54  0000] [4] [INFO] Shutting down: Master
2022-01-16T05:22:54.199340 00:00 app[web.1]: [2022-01-16 05:22:54  0000] [4] [INFO] Reason: Worker failed to boot.
2022-01-16T05:22:54.387799 00:00 heroku[web.1]: Process exited with status 3
2022-01-16T05:22:54.498114 00:00 heroku[web.1]: State changed from starting to crashed
2022-01-16T05:22:57.000000 00:00 app[api]: Build succeeded
2022-01-16T05:23:01.227344 00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=myproject.herokuapp.com request_id=49558b9a-5030-4ed9-bf0a-cc8642531c44 fwd="204.128.182.15" dyno= connect= service= status=503 bytes= protocol=https
2022-01-16T05:23:01.528171 00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=myproject.herokuapp.com request_id=41626c63-e4e6-4e72-90e7-c0e36d3c928d fwd="204.128.182.15" dyno= connect= service= status=503 bytes= protocol=https

I can't find anything on how to fix this. Plus, it seems like this is a very generic code, so its hard to get accurate info on what to do. How can I get rid of this error? Plus, I just figured how to fix ther error H14 I was getting.

CodePudding user response:

Add to your settings.py file

DEBUG_PROPAGATE_EXCEPTIONS = True

Then set it to False after you Find the error

CodePudding user response:

Fixed it - didn't capitalize the project name in the procfile.

  •  Tags:  
  • Related