Problems to deploy django in heroku - django

Follow the log:
2016-03-05T15:09:05.318884+00:00 app[web.1]: worker.init_process()
2016-03-05T15:09:05.318885+00:00 app[web.1]: self.load_wsgi()
2016-03-05T15:09:05.318888+00:00 app[web.1]: self.callable = self.load()
2016-03-05T15:09:05.318886+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2016-03-05T15:09:05.318888+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2016-03-05T15:09:05.318890+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2016-03-05T15:09:05.318885+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 122, in init_process
2016-03-05T15:09:05.318893+00:00 app[web.1]: application = get_wsgi_application()
2016-03-05T15:09:05.318895+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 17, in setup
2016-03-05T15:09:05.318889+00:00 app[web.1]: return self.load_wsgiapp()
2016-03-05T15:09:05.318891+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 357, in import_app
2016-03-05T15:09:05.318892+00:00 app[web.1]: File "/app/redewebsite/wsgi.py", line 21, in <module>
2016-03-05T15:09:05.319022+00:00 app[web.1]: [2016-03-05 15:09:05 +0000] [9] [INFO] Worker exiting (pid: 9)
2016-03-05T15:09:05.318890+00:00 app[web.1]: return util.import_app(self.app_uri)
2016-03-05T15:09:05.318894+00:00 app[web.1]: django.setup()
2016-03-05T15:09:05.318896+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2016-03-05T15:09:05.318897+00:00 app[web.1]: self._setup(name)
2016-03-05T15:09:05.324196+00:00 app[web.1]: [2016-03-05 15:09:05 +0000] [10] [ERROR] Exception in worker process:
2016-03-05T15:09:05.318892+00:00 app[web.1]: __import__(module)
2016-03-05T15:09:05.318896+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
2016-03-05T15:09:05.324211+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 122, in init_process
2016-03-05T15:09:05.324212+00:00 app[web.1]: self.load_wsgi()
2016-03-05T15:09:05.324213+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 130, in load_wsgi
2016-03-05T15:09:05.324215+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2016-03-05T15:09:05.318894+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
2016-03-05T15:09:05.318898+00:00 app[web.1]: % (desc, ENVIRONMENT_VARIABLE))
2016-03-05T15:09:05.324216+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2016-03-05T15:09:05.318898+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
2016-03-05T15:09:05.324216+00:00 app[web.1]: return self.load_wsgiapp()
2016-03-05T15:09:05.324221+00:00 app[web.1]: django.setup()
2016-03-05T15:09:05.324219+00:00 app[web.1]: File "/app/redewebsite/wsgi.py", line 21, in <module>
2016-03-05T15:09:05.318899+00:00 app[web.1]: ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
2016-03-05T15:09:05.324222+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2016-03-05T15:09:05.324208+00:00 app[web.1]: Traceback (most recent call last):
2016-03-05T15:09:05.324213+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2016-03-05T15:09:05.324214+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2016-03-05T15:09:05.324210+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 515, in spawn_worker
2016-03-05T15:09:05.324211+00:00 app[web.1]: worker.init_process()
2016-03-05T15:09:05.324218+00:00 app[web.1]: __import__(module)
2016-03-05T15:09:05.324214+00:00 app[web.1]: self.callable = self.load()
2016-03-05T15:09:05.324220+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
2016-03-05T15:09:05.324224+00:00 app[web.1]: self._setup(name)
2016-03-05T15:09:05.324217+00:00 app[web.1]: return util.import_app(self.app_uri)
2016-03-05T15:09:05.324218+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 357, in import_app
2016-03-05T15:09:05.324220+00:00 app[web.1]: application = get_wsgi_application()
2016-03-05T15:09:05.324251+00:00 app[web.1]: self.load_wsgi()
2016-03-05T15:09:05.324225+00:00 app[web.1]: % (desc, ENVIRONMENT_VARIABLE))
2016-03-05T15:09:05.324250+00:00 app[web.1]: worker.init_process()
2016-03-05T15:09:05.324248+00:00 app[web.1]: Traceback (most recent call last):
2016-03-05T15:09:05.324226+00:00 app[web.1]: ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
2016-03-05T15:09:05.324252+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 130, in load_wsgi
2016-03-05T15:09:05.324224+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
2016-03-05T15:09:05.324250+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 515, in spawn_worker
2016-03-05T15:09:05.324255+00:00 app[web.1]: return self.load_wsgiapp()
2016-03-05T15:09:05.324222+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 17, in setup
2016-03-05T15:09:05.324223+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
2016-03-05T15:09:05.324255+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2016-03-05T15:09:05.324253+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2016-03-05T15:09:05.324254+00:00 app[web.1]: self.callable = self.load()
2016-03-05T15:09:05.324251+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 122, in init_process
2016-03-05T15:09:05.324252+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2016-03-05T15:09:05.324254+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2016-03-05T15:09:05.324256+00:00 app[web.1]: return util.import_app(self.app_uri)
2016-03-05T15:09:05.324258+00:00 app[web.1]: application = get_wsgi_application()
2016-03-05T15:09:05.324259+00:00 app[web.1]: django.setup()
2016-03-05T15:09:05.324259+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
2016-03-05T15:09:05.324260+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 17, in setup
2016-03-05T15:09:05.324261+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
2016-03-05T15:09:05.324257+00:00 app[web.1]: __import__(module)
2016-03-05T15:09:05.324258+00:00 app[web.1]: File "/app/redewebsite/wsgi.py", line 21, in <module>
2016-03-05T15:09:05.324264+00:00 app[web.1]: ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
2016-03-05T15:09:05.382734+00:00 app[web.1]: Traceback (most recent call last):
2016-03-05T15:09:05.324257+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 357, in import_app
2016-03-05T15:09:05.324261+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2016-03-05T15:09:05.324262+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
2016-03-05T15:09:05.324262+00:00 app[web.1]: self._setup(name)
2016-03-05T15:09:05.324263+00:00 app[web.1]: % (desc, ENVIRONMENT_VARIABLE))
2016-03-05T15:09:05.383454+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 72, in run
2016-03-05T15:09:05.383456+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 206, in run
2016-03-05T15:09:05.324374+00:00 app[web.1]: [2016-03-05 15:09:05 +0000] [10] [INFO] Worker exiting (pid: 10)
2016-03-05T15:09:05.382767+00:00 app[web.1]: sys.exit(run())
2016-03-05T15:09:05.383460+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 219, in handle_chld
2016-03-05T15:09:05.382753+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>
2016-03-05T15:09:05.383455+00:00 app[web.1]: Arbiter(self).run()
2016-03-05T15:09:05.383460+00:00 app[web.1]: time.sleep(0.1)
2016-03-05T15:09:05.383457+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 302, in halt
2016-03-05T15:09:05.382793+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
2016-03-05T15:09:05.383457+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2016-03-05T15:09:05.383458+00:00 app[web.1]: self.stop()
2016-03-05T15:09:05.383459+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 347, in stop
2016-03-05T15:09:05.383462+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2016-03-05T15:09:05.382834+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2016-03-05T15:09:05.382860+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 192, in run
2016-03-05T15:09:05.383453+00:00 app[web.1]: super(Application, self).run()
2016-03-05T15:09:05.383461+00:00 app[web.1]: self.reap_workers()
2016-03-05T15:09:05.383462+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 464, in reap_workers
2016-03-05T15:09:05.383463+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2016-03-05T15:09:06.271890+00:00 heroku[web.1]: Process exited with status 1
2016-03-05T15:09:06.284071+00:00 heroku[web.1]: State changed from starting to crashed
2016-03-05T15:09:08.486440+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=redewebsite.herokuapp.com request_id=083bbcbc-0cac-459b-af5b-c7ea9f59e080 fwd="189.48.111.130" dyno= connect= service= status=503 bytes=
2016-03-05T15:10:17.486279+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=redewebsite.herokuapp.com request_id=64746251-2419-4525-b257-695effd9f15d fwd="189.48.111.130" dyno= connect= service= status=503 bytes=
When I run heroku open, return-me 503 and the message:
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
Someone could help me?

Related

Error code=H10 desc="App Crashed" when trying to deploy my Flask app onto Heroku

I recently learned to code and built a Flask application which im trying to deploy on Heroku (https://github.com/RoiHirsh/Final-Project.git). The code H10 im getting is generic and im not able to come up with clues as to how to debug this just by looking at the heroku logs. One thing that comes up everywhere is "Exception in worker process" which im not sure what that refers to.
I tried all the variations of the Procfile I saw here on stackoverflow, created the virtual environment, activated it, freezed requirements, installed gunicorn, created the runtime.txt etc.
From what I saw as solutions here on stackoverflow, I know i didnt actively setup a PORT on heroku and therefore overidden the default heroku one, there seems to be 1 dyno working correctly (so the Procfile should be fine), I tried pushing from git multiple times to see if its an issue of some requirements not being installed correctly, etc.
Here is the long Heroku logs, and some of the related files I created:
runtime.txt
python-3.10.6
requirements.txt
cachelib==0.9.0
certifi==2022.6.15
charset-normalizer==2.1.0
click==8.1.3
colorama==0.4.4
cs50==9.2.0
distlib==0.3.4
filelock==3.7.1
Flask==2.1.2
Flask-Session==0.4.0
greenlet==1.1.2
gunicorn==20.0.4
idna==3.3
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.1
platformdirs==2.5.2
requests==2.28.1
six==1.16.0
SQLAlchemy==1.4.37
sqlparse==0.4.2
termcolor==1.1.0
urllib3==1.26.10
virtualenv==20.15.1
Werkzeug==2.1.2
Procfile
web: gunicorn app:app
app.py
from flask import Flask, render_template, request
import inputs # importing all inputs from a separate python file - inputs.py
import sqlite3
app = Flask(__name__)
# some code
#app.route('/')
def home():
#some code
#app.route('/dashboard', methods=['POST','GET'])
def dashboard():
#some code
if __name__ == '__main__':
app.run(debug=True)
And the long Heroku logs --tail message:
ยป Warning: heroku update available from 7.53.0 to 7.63.4.
2022-09-18T09:50:58.371266+00:00 app[web.1]: [2022-09-18 09:50:58 +0000] [10] [INFO] Booting worker with pid: 10
2022-09-18T09:50:58.710094+00:00 app[web.1]: [2022-09-18 09:50:58 +0000] [10] [ERROR] Exception in worker process
2022-09-18T09:50:58.710114+00:00 app[web.1]: Traceback (most recent call last):
2022-09-18T09:50:58.710115+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2022-09-18T09:50:58.710115+00:00 app[web.1]: worker.init_process()
2022-09-18T09:50:58.710116+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/workers/base.py", line 119, in init_process
2022-09-18T09:50:58.710116+00:00 app[web.1]: self.load_wsgi()
2022-09-18T09:50:58.710117+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
2022-09-18T09:50:58.710117+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2022-09-18T09:50:58.710118+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/app/base.py", line 67, in wsgi
2022-09-18T09:50:58.710118+00:00 app[web.1]: self.callable = self.load()
2022-09-18T09:50:58.710118+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
2022-09-18T09:50:58.710119+00:00 app[web.1]: return self.load_wsgiapp()
2022-09-18T09:50:58.710119+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
2022-09-18T09:50:58.710119+00:00 app[web.1]: return util.import_app(self.app_uri)
2022-09-18T09:50:58.710119+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/util.py", line 358, in import_app
2022-09-18T09:50:58.710120+00:00 app[web.1]: mod = importlib.import_module(module)
2022-09-18T09:50:58.710120+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/importlib/__init__.py", line 126, in import_module
2022-09-18T09:50:58.710122+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2022-09-18T09:50:58.710122+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
2022-09-18T09:50:58.710122+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
2022-09-18T09:50:58.710122+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked2022-09-18T09:50:58.710122+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
2022-09-18T09:50:58.710123+00:00 app[web.1]: File "<frozen importlib._bootstrap_external>", line 883, in exec_module
2022-09-18T09:50:58.710123+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
2022-09-18T09:50:58.710123+00:00 app[web.1]: File "/app/app.py", line 2, in <module>
2022-09-18T09:50:58.710123+00:00 app[web.1]: import inputs # importing all inputs from a separate python file - inputs.py
2022-09-18T09:50:58.710123+00:00 app[web.1]: File "/app/inputs.py", line 13, in <module>
2022-09-18T09:50:58.710124+00:00 app[web.1]: cur.execute("SELECT * FROM daily_app_inputs WHERE dt = ?", temp) # fetching all the inputs for today
2022-09-18T09:50:58.710124+00:00 app[web.1]: sqlite3.OperationalError: no such table: daily_app_inputs
2022-09-18T09:50:58.710124+00:00 app[web.1]: [2022-09-18 09:50:58 +0000] [9] [ERROR] Exception in worker process
2022-09-18T09:50:58.710124+00:00 app[web.1]: Traceback (most recent call last):
2022-09-18T09:50:58.710124+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2022-09-18T09:50:58.710125+00:00 app[web.1]: worker.init_process()
2022-09-18T09:50:58.710125+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/workers/base.py", line 119, in init_process
2022-09-18T09:50:58.710125+00:00 app[web.1]: self.load_wsgi()
2022-09-18T09:50:58.710125+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
2022-09-18T09:50:58.710126+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2022-09-18T09:50:58.710126+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/app/base.py", line 67, in wsgi
2022-09-18T09:50:58.710126+00:00 app[web.1]: self.callable = self.load()
2022-09-18T09:50:58.710126+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
2022-09-18T09:50:58.710126+00:00 app[web.1]: return self.load_wsgiapp()
2022-09-18T09:50:58.710133+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
2022-09-18T09:50:58.710134+00:00 app[web.1]: return util.import_app(self.app_uri)
2022-09-18T09:50:58.710134+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/util.py", line 358, in import_app
2022-09-18T09:50:58.710134+00:00 app[web.1]: mod = importlib.import_module(module)
2022-09-18T09:50:58.710134+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/importlib/__init__.py", line 126, in import_module
2022-09-18T09:50:58.710134+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2022-09-18T09:50:58.710134+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
2022-09-18T09:50:58.710135+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
2022-09-18T09:50:58.710135+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked2022-09-18T09:50:58.710135+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
2022-09-18T09:50:58.710135+00:00 app[web.1]: File "<frozen importlib._bootstrap_external>", line 883, in exec_module
2022-09-18T09:50:58.710135+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
2022-09-18T09:50:58.710135+00:00 app[web.1]: File "/app/app.py", line 2, in <module>
2022-09-18T09:50:58.710135+00:00 app[web.1]: import inputs # importing all inputs from a separate python file - inputs.py
2022-09-18T09:50:58.710136+00:00 app[web.1]: File "/app/inputs.py", line 13, in <module>
2022-09-18T09:50:58.710136+00:00 app[web.1]: cur.execute("SELECT * FROM daily_app_inputs WHERE dt = ?", temp) # fetching all the inputs for today
2022-09-18T09:50:58.710136+00:00 app[web.1]: sqlite3.OperationalError: no such table: daily_app_inputs
2022-09-18T09:50:58.710196+00:00 app[web.1]: [2022-09-18 09:50:58 +0000] [9] [INFO] Worker exiting (pid: 9)
2022-09-18T09:50:58.710196+00:00 app[web.1]: [2022-09-18 09:50:58 +0000] [10] [INFO] Worker exiting (pid: 10)
2022-09-18T09:50:58.765954+00:00 app[web.1]: Traceback (most recent call last):
2022-09-18T09:50:58.765963+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/arbiter.py", line 209, in run
2022-09-18T09:50:58.766171+00:00 app[web.1]: self.sleep()
2022-09-18T09:50:58.766179+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/arbiter.py", line 357, in sleep
2022-09-18T09:50:58.766297+00:00 app[web.1]: ready = select.select([self.PIPE[0]], [], [], 1.0)
2022-09-18T09:50:58.766305+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
2022-09-18T09:50:58.766407+00:00 app[web.1]: self.reap_workers()
2022-09-18T09:50:58.766415+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2022-09-18T09:50:58.766534+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2022-09-18T09:50:58.766586+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2022-09-18T09:50:58.766589+00:00 app[web.1]:
2022-09-18T09:50:58.766590+00:00 app[web.1]: During handling of the above exception, another exception occurred:
2022-09-18T09:50:58.766590+00:00 app[web.1]:
2022-09-18T09:50:58.766597+00:00 app[web.1]: Traceback (most recent call last):
2022-09-18T09:50:58.766613+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 8, in <module>
2022-09-18T09:50:58.766683+00:00 app[web.1]: sys.exit(run())
2022-09-18T09:50:58.766692+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 58, in run
2022-09-18T09:50:58.766760+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2022-09-18T09:50:58.766769+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/app/base.py", line 228, in run
2022-09-18T09:50:58.766854+00:00 app[web.1]: super().run()
2022-09-18T09:50:58.766862+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/app/base.py", line 72, in run
2022-09-18T09:50:58.766929+00:00 app[web.1]: Arbiter(self).run()
2022-09-18T09:50:58.766937+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/arbiter.py", line 229, in run
2022-09-18T09:50:58.767017+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2022-09-18T09:50:58.767044+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/arbiter.py", line 342, in halt
2022-09-18T09:50:58.767149+00:00 app[web.1]: self.stop()
2022-09-18T09:50:58.767162+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/arbiter.py", line 393, in stop
2022-09-18T09:50:58.767262+00:00 app[web.1]: time.sleep(0.1)
2022-09-18T09:50:58.767270+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
2022-09-18T09:50:58.767352+00:00 app[web.1]: self.reap_workers()
2022-09-18T09:50:58.767360+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2022-09-18T09:50:58.767470+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2022-09-18T09:50:58.767516+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2022-09-18T09:50:58.768416+00:00 heroku[web.1]: State changed from starting to up
2022-09-18T09:50:58.918308+00:00 heroku[web.1]: Process exited with status 1
2022-09-18T09:50:59.020525+00:00 heroku[web.1]: State changed from up to crashed
2022-09-18T09:51:00.000000+00:00 app[api]: Build succeeded
2022-09-18T09:51:13.561288+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=final-project-roi.herokuapp.com request_id=1155ae19-6f42-4e07-be8a-f3e68cebb0dd fwd="77.125.130.159" dyno= connect= service= status=503 bytes= protocol=https
2022-09-18T09:51:14.563562+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=final-project-roi.herokuapp.com request_id=9cb8ca83-bc6d-4b0a-bd66-6ac06c310ea0 fwd="77.125.130.159" dyno= connect= service= status=503 bytes= protocol=https
This is my project folder screenshot:
project folders
Thank you in advance for any thought I might take to try and debug this.

Heroku Flask app crashes before it even starts [duplicate]

This question already has answers here:
Deploying 'Django for beginners' app to Heroku fails with ModuleNotFoundError: No module named '_tkinter'
(1 answer)
ModuleNotFoundError: No module named '_tkinter' Heroku
(4 answers)
"no module found: tkinter" after deploying in heroku
(1 answer)
Closed 8 months ago.
I get this error in my logs --tail
at=error code=H10 desc="App crashed" method=GET path="/" host=tsuyo-workout.herokuapp.com request_id=069bdbc7-cdb1-4d4e-8cc2-ec8dc55890f5 fwd="184.189.121.138" dyno= connect= service= status=503 bytes= protocol=https
At first I had my port set to 5000 as I was developing locally. I used this question to fix the h10 error. I still have the same error.
I fixed some other errors before this and they were:
Not having a Procfile. I added one.
Procfile:
web: gunicorn app:app
I fixed up my requirements.txt. I added gunicorn.
requirments.txt
click==8.0.3
Flask==2.0.2
itsdangerous==2.0.1
Jinja2==3.0.3
MarkupSafe==2.0.1
Werkzeug==2.0.3
gunicorn==20.0.4
I think the only relevant info in my app.py is this. Let me know if you need more:
app.py
app = Flask(__name__)
port = int(os.getenv('PORT'))
if __name__ == '__main__':
app.run(port=port)
I have a database in this app. Could it be the fact that I have a database?
Some more lines of errors per request.
2022-07-06T20:50:53.695436+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
2022-07-06T20:50:53.695436+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2022-07-06T20:50:53.695437+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
2022-07-06T20:50:53.695437+00:00 app[web.1]: self.callable = self.load()
2022-07-06T20:50:53.695437+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
2022-07-06T20:50:53.695437+00:00 app[web.1]: return self.load_wsgiapp()
2022-07-06T20:50:53.695438+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
2022-07-06T20:50:53.695438+00:00 app[web.1]: return util.import_app(self.app_uri)
2022-07-06T20:50:53.695439+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
2022-07-06T20:50:53.695439+00:00 app[web.1]: mod = importlib.import_module(module)
2022-07-06T20:50:53.695439+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/importlib/__init__.py", line 127, in import_module
2022-07-06T20:50:53.695440+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2022-07-06T20:50:53.695440+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
2022-07-06T20:50:53.695440+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2022-07-06T20:50:53.695440+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
2022-07-06T20:50:53.695441+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
2022-07-06T20:50:53.695441+00:00 app[web.1]: File "<frozen importlib._bootstrap_external>", line 843, in exec_module
2022-07-06T20:50:53.695441+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2022-07-06T20:50:53.695441+00:00 app[web.1]: File "/app/app.py", line 5, in <module>
2022-07-06T20:50:53.695442+00:00 app[web.1]: from helper import message, get_db_connection, default, login_required
2022-07-06T20:50:53.695442+00:00 app[web.1]: File "/app/helper.py", line 2, in <module>
2022-07-06T20:50:53.695442+00:00 app[web.1]: from turtle import clear
2022-07-06T20:50:53.695443+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/turtle.py", line 107, in <module>
2022-07-06T20:50:53.695443+00:00 app[web.1]: import tkinter as TK
2022-07-06T20:50:53.695443+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/tkinter/__init__.py", line 36, in <module>
2022-07-06T20:50:53.695444+00:00 app[web.1]: import _tkinter # If this fails your Python may not be configured for Tk
2022-07-06T20:50:53.695444+00:00 app[web.1]: ModuleNotFoundError: No module named '_tkinter'
2022-07-06T20:50:53.695559+00:00 app[web.1]: [2022-07-06 20:50:53 +0000] [11] [INFO] Worker exiting (pid: 11)
2022-07-06T20:50:53.696450+00:00 app[web.1]: [2022-07-06 20:50:53 +0000] [10] [ERROR] Exception in worker process
2022-07-06T20:50:53.696451+00:00 app[web.1]: Traceback (most recent call last):
2022-07-06T20:50:53.696451+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2022-07-06T20:50:53.696452+00:00 app[web.1]: worker.init_process()
2022-07-06T20:50:53.696452+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process
2022-07-06T20:50:53.696452+00:00 app[web.1]: self.load_wsgi()
2022-07-06T20:50:53.696453+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
2022-07-06T20:50:53.696453+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2022-07-06T20:50:53.696454+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
2022-07-06T20:50:53.696454+00:00 app[web.1]: self.callable = self.load()
2022-07-06T20:50:53.696454+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
2022-07-06T20:50:53.696454+00:00 app[web.1]: return self.load_wsgiapp()
2022-07-06T20:50:53.696455+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
2022-07-06T20:50:53.696455+00:00 app[web.1]: return util.import_app(self.app_uri)
2022-07-06T20:50:53.696455+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
2022-07-06T20:50:53.696455+00:00 app[web.1]: mod = importlib.import_module(module)
2022-07-06T20:50:53.696456+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/importlib/__init__.py", line 127, in import_module
2022-07-06T20:50:53.696456+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2022-07-06T20:50:53.696457+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
2022-07-06T20:50:53.696457+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2022-07-06T20:50:53.696457+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
2022-07-06T20:50:53.696458+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
2022-07-06T20:50:53.696458+00:00 app[web.1]: File "<frozen importlib._bootstrap_external>", line 843, in exec_module
2022-07-06T20:50:53.696458+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2022-07-06T20:50:53.696459+00:00 app[web.1]: File "/app/app.py", line 5, in <module>
2022-07-06T20:50:53.696459+00:00 app[web.1]: from helper import message, get_db_connection, default, login_required
2022-07-06T20:50:53.696459+00:00 app[web.1]: File "/app/helper.py", line 2, in <module>
2022-07-06T20:50:53.696460+00:00 app[web.1]: from turtle import clear
2022-07-06T20:50:53.696462+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/turtle.py", line 107, in <module>
2022-07-06T20:50:53.696462+00:00 app[web.1]: import tkinter as TK
2022-07-06T20:50:53.696463+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/tkinter/__init__.py", line 36, in <module>
2022-07-06T20:50:53.696463+00:00 app[web.1]: import _tkinter # If this fails your Python may not be configured for Tk
2022-07-06T20:50:53.696463+00:00 app[web.1]: ModuleNotFoundError: No module named '_tkinter'
2022-07-06T20:50:53.696580+00:00 app[web.1]: [2022-07-06 20:50:53 +0000] [10] [INFO] Worker exiting (pid: 10)
2022-07-06T20:50:53.745546+00:00 app[web.1]: Traceback (most recent call last):
2022-07-06T20:50:53.745553+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 209, in run
2022-07-06T20:50:53.745765+00:00 app[web.1]: self.sleep()
2022-07-06T20:50:53.745775+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 357, in sleep
2022-07-06T20:50:53.745917+00:00 app[web.1]: ready = select.select([self.PIPE[0]], [], [], 1.0)
2022-07-06T20:50:53.745927+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
2022-07-06T20:50:53.746025+00:00 app[web.1]: self.reap_workers()
2022-07-06T20:50:53.746033+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2022-07-06T20:50:53.746179+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2022-07-06T20:50:53.746222+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2022-07-06T20:50:53.746223+00:00 app[web.1]:
2022-07-06T20:50:53.746223+00:00 app[web.1]: During handling of the above exception, another exception occurred:
2022-07-06T20:50:53.746223+00:00 app[web.1]:
2022-07-06T20:50:53.746230+00:00 app[web.1]: Traceback (most recent call last):
2022-07-06T20:50:53.746232+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 8, in <module>
2022-07-06T20:50:53.746304+00:00 app[web.1]: sys.exit(run())
2022-07-06T20:50:53.746306+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 58, in run
2022-07-06T20:50:53.746383+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2022-07-06T20:50:53.746398+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/base.py", line 228, in run
2022-07-06T20:50:53.746488+00:00 app[web.1]: super().run()
2022-07-06T20:50:53.746489+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/base.py", line 72, in run
2022-07-06T20:50:53.746561+00:00 app[web.1]: Arbiter(self).run()
2022-07-06T20:50:53.746563+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 229, in run
2022-07-06T20:50:53.746654+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2022-07-06T20:50:53.746656+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 342, in halt
2022-07-06T20:50:53.746772+00:00 app[web.1]: self.stop()
2022-07-06T20:50:53.746773+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 388, in stop
2022-07-06T20:50:53.746893+00:00 app[web.1]: limit = time.time() + self.cfg.graceful_timeout
2022-07-06T20:50:53.746894+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/config.py", line 57, in __getattr__
2022-07-06T20:50:53.746969+00:00 app[web.1]: return self.settings[name].get()
2022-07-06T20:50:53.746971+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
2022-07-06T20:50:53.747058+00:00 app[web.1]: self.reap_workers()
2022-07-06T20:50:53.747068+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2022-07-06T20:50:53.747213+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2022-07-06T20:50:53.747235+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2022-07-06T20:50:53.882989+00:00 heroku[web.1]: Process exited with status 1
2022-07-06T20:50:53.927947+00:00 heroku[web.1]: State changed from up to crashed
2022-07-06T21:18:19.470130+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=tsuyo-workout.herokuapp.com request_id=767ea937-4ad8-46f4-ad68-a8fa68f8c15b fwd="184.189.121.138" dyno= connect= service= status=503 bytes= protocol=https

Heroku deployment succes but no module found

I am deploying the polls app from django tutorial to heroku.
My project seen from Pycharm have the following distribution:
My requirements file looks as:
Django==2.0.5
scikit-learn==0.19.1
numpy==1.13.3
pandas==0.22.0
pymysql==0.8.1
gunicorn==19.0.0
Runtime as:
python-3.6.5
Procfile as:
web: gunicorn inf-shf-373.wsgi:application --log-file -
When I deploy the app and goes to the browser I get an application error that says:
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.
I retrieve the log using the heroku logs --tail --app inf-shf-373
statement.
Log
2018-06-15T10:08:51.529196+00:00 app[web.1]: return util.import_app(self.app_uri)
2018-06-15T10:08:51.529198+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 356, in import_app
2018-06-15T10:08:51.529201+00:00 app[web.1]: ModuleNotFoundError: No module named 'inf-shf-373'
2018-06-15T10:08:51.529199+00:00 app[web.1]: __import__(module)
2018-06-15T10:08:51.529202+00:00 app[web.1]: Traceback (most recent call last):
2018-06-15T10:08:51.529203+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 502, in spawn_worker
2018-06-15T10:08:51.529205+00:00 app[web.1]: worker.init_process()
2018-06-15T10:08:51.529206+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 114, in init_process
2018-06-15T10:08:51.529208+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2018-06-15T10:08:51.529209+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 66, in wsgi
2018-06-15T10:08:51.529211+00:00 app[web.1]: self.callable = self.load()
2018-06-15T10:08:51.529212+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2018-06-15T10:08:51.529216+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2018-06-15T10:08:51.529214+00:00 app[web.1]: return self.load_wsgiapp()
2018-06-15T10:08:51.529218+00:00 app[web.1]: return util.import_app(self.app_uri)
2018-06-15T10:08:51.529219+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 356, in import_app
2018-06-15T10:08:51.529221+00:00 app[web.1]: __import__(module)
2018-06-15T10:08:51.529222+00:00 app[web.1]: ModuleNotFoundError: No module named 'inf-shf-373'
2018-06-15T10:08:51.529340+00:00 app[web.1]: 2018-06-15 10:08:51 [8] [INFO] Worker exiting (pid: 8)
2018-06-15T10:08:51.568925+00:00 app[web.1]: Traceback (most recent call last):
2018-06-15T10:08:51.568993+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>
2018-06-15T10:08:51.569405+00:00 app[web.1]: load_entry_point('gunicorn==19.0.0', 'console_scripts', 'gunicorn')()
2018-06-15T10:08:51.569437+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
2018-06-15T10:08:51.569696+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2018-06-15T10:08:51.569725+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 166, in run
2018-06-15T10:08:51.570022+00:00 app[web.1]: super(Application, self).run()
2018-06-15T10:08:51.570050+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 71, in run
2018-06-15T10:08:51.570255+00:00 app[web.1]: Arbiter(self).run()
2018-06-15T10:08:51.570283+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 169, in run
2018-06-15T10:08:51.570559+00:00 app[web.1]: self.manage_workers()
2018-06-15T10:08:51.570587+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 477, in manage_workers
2018-06-15T10:08:51.571398+00:00 app[web.1]: self.spawn_workers()
2018-06-15T10:08:51.571426+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 537, in spawn_workers
2018-06-15T10:08:51.572443+00:00 app[web.1]: time.sleep(0.1 * random.random())
2018-06-15T10:08:51.572572+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 209, in handle_chld
2018-06-15T10:08:51.573025+00:00 app[web.1]: self.reap_workers()
2018-06-15T10:08:51.573611+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 459, in reap_workers
2018-06-15T10:08:51.574215+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2018-06-15T10:08:51.574320+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2018-06-15T10:08:51.656203+00:00 heroku[web.1]: Process exited with status 1
2018-06-15T10:08:51.766089+00:00 heroku[web.1]: State changed from starting to crashed
2018-06-15T10:08:51.768196+00:00 heroku[web.1]: State changed from crashed to starting
2018-06-15T10:08:59.756644+00:00 heroku[web.1]: Starting process with command `gunicorn inf-shf-373.wsgi:application --log-file -`
2018-06-15T10:09:01.853255+00:00 heroku[web.1]: Process exited with status 1
2018-06-15T10:09:01.754462+00:00 app[web.1]: 2018-06-15 10:09:01 [4] [INFO] Starting gunicorn 19.0.0
2018-06-15T10:09:01.754969+00:00 app[web.1]: 2018-06-15 10:09:01 [4] [INFO] Listening at: http://0.0.0.0:24374 (4)
2018-06-15T10:09:01.755073+00:00 app[web.1]: 2018-06-15 10:09:01 [4] [INFO] Using worker: sync
2018-06-15T10:09:01.758731+00:00 app[web.1]: 2018-06-15 10:09:01 [8] [INFO] Booting worker with pid: 8
2018-06-15T10:09:01.762508+00:00 app[web.1]: 2018-06-15 10:09:01 [8] [ERROR] Exception in worker process:
2018-06-15T10:09:01.762510+00:00 app[web.1]: Traceback (most recent call last):
2018-06-15T10:09:01.762511+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 502, in spawn_worker
2018-06-15T10:09:01.762513+00:00 app[web.1]: worker.init_process()
2018-06-15T10:09:01.762514+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 114, in init_process
2018-06-15T10:09:01.762515+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2018-06-15T10:09:01.762516+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 66, in wsgi
2018-06-15T10:09:01.762517+00:00 app[web.1]: self.callable = self.load()
2018-06-15T10:09:01.762519+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2018-06-15T10:09:01.762520+00:00 app[web.1]: return self.load_wsgiapp()
2018-06-15T10:09:01.762521+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2018-06-15T10:09:01.762522+00:00 app[web.1]: return util.import_app(self.app_uri)
2018-06-15T10:09:01.762523+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 356, in import_app
2018-06-15T10:09:01.762524+00:00 app[web.1]: __import__(module)
2018-06-15T10:09:01.762525+00:00 app[web.1]: ModuleNotFoundError: No module named 'inf-shf-373'
2018-06-15T10:09:01.762526+00:00 app[web.1]: Traceback (most recent call last):
2018-06-15T10:09:01.762527+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 502, in spawn_worker
2018-06-15T10:09:01.762528+00:00 app[web.1]: worker.init_process()
2018-06-15T10:09:01.762529+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 114, in init_process
2018-06-15T10:09:01.762530+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2018-06-15T10:09:01.762532+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 66, in wsgi
2018-06-15T10:09:01.762533+00:00 app[web.1]: self.callable = self.load()
2018-06-15T10:09:01.762534+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2018-06-15T10:09:01.762535+00:00 app[web.1]: return self.load_wsgiapp()
2018-06-15T10:09:01.762536+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2018-06-15T10:09:01.762537+00:00 app[web.1]: return util.import_app(self.app_uri)
2018-06-15T10:09:01.762538+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 356, in import_app
2018-06-15T10:09:01.762543+00:00 app[web.1]: ModuleNotFoundError: No module named 'inf-shf-373'
2018-06-15T10:09:01.762539+00:00 app[web.1]: __import__(module)
2018-06-15T10:09:01.762635+00:00 app[web.1]: 2018-06-15 10:09:01 [8] [INFO] Worker exiting (pid: 8)
2018-06-15T10:09:01.790830+00:00 app[web.1]: Traceback (most recent call last):
2018-06-15T10:09:01.790840+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>
2018-06-15T10:09:01.791070+00:00 app[web.1]: load_entry_point('gunicorn==19.0.0', 'console_scripts', 'gunicorn')()
2018-06-15T10:09:01.791073+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
2018-06-15T10:09:01.791209+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2018-06-15T10:09:01.791216+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 166, in run
2018-06-15T10:09:01.791357+00:00 app[web.1]: super(Application, self).run()
2018-06-15T10:09:01.791360+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 71, in run
2018-06-15T10:09:01.791467+00:00 app[web.1]: Arbiter(self).run()
2018-06-15T10:09:01.791470+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 169, in run
2018-06-15T10:09:01.791600+00:00 app[web.1]: self.manage_workers()
2018-06-15T10:09:01.791603+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 477, in manage_workers
2018-06-15T10:09:01.791814+00:00 app[web.1]: self.spawn_workers()
2018-06-15T10:09:01.791816+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 537, in spawn_workers
2018-06-15T10:09:01.792051+00:00 app[web.1]: time.sleep(0.1 * random.random())
2018-06-15T10:09:01.792055+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 209, in handle_chld
2018-06-15T10:09:01.792184+00:00 app[web.1]: self.reap_workers()
2018-06-15T10:09:01.792187+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 459, in reap_workers
2018-06-15T10:09:01.792383+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2018-06-15T10:09:01.792417+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2018-06-15T10:09:01.897234+00:00 heroku[web.1]: State changed from starting to crashed
2018-06-15T10:09:15.812856+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=inf-shf-373.herokuapp.com request_id=32838b77-14c1-4235-8ac1-9823f14dab4b fwd="80.94.4.53" dyno= connect= service= status=503 bytes= protocol=https
I believe that setting.py at my project directory doesn't have an app called inf-shf-373, but it is the random name created by heroku. This means that my whole app name, and then the references at Procfile should be surveys (I changed the polls name to surveys despite the tutorial).
Any reference to what is the problem?
EDIT
Answering DanielRoseman:
The wsgi.py file is at: code/computationalMarketing/computationalMarketing/wsgi.py
Extra information:
Is it possible that the problem can be that the wsgi.py file is not in the main path of the repo? The django project is the first computationalMarketing folder (this project is all gathered at code folder), the other folders that exists at the same level are sql mods, and vagrant files.
Finally I have been able to solve this question.
I have found the parameter chdir at gunicorn, which stablish the path to the wsgi.py file at django app.
An example:
web: gunicorn --chdir code/computationalMarketing computationalMarketing.wsgi --log-file -

ValueError: Unable to configure logger 'django_request': Unable to add handler 'request_handler': 'request_handler'

I am trying to deploy my Django site onto Heroku but I get:
Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
I ran heroku logs and this is my full stacktrace:
2015-02-23T15:53:34.259352+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2015-02-23T15:53:34.259353+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2015-02-23T15:53:34.259358+00:00 app[web.1]: return self.load_wsgiapp()
2015-02-23T15:53:34.259356+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2015-02-23T15:53:34.259359+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2015-02-23T15:53:34.259361+00:00 app[web.1]: return util.import_app(self.app_uri)
2015-02-23T15:53:34.259364+00:00 app[web.1]: __import__(module)
2015-02-23T15:53:34.259365+00:00 app[web.1]: File "/app/django_test/wsgi.py", line 14, in <module>
2015-02-23T15:53:34.259362+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 355, in import_app
2015-02-23T15:53:34.259375+00:00 app[web.1]: logging_config_func(logging_settings)
2015-02-23T15:53:34.259366+00:00 app[web.1]: application = get_wsgi_application()
2015-02-23T15:53:34.259371+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 20, in setup
2015-02-23T15:53:34.259373+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/log.py", line 87, in configure_logging
2015-02-23T15:53:34.259376+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 794, in dictConfig
2015-02-23T15:53:34.259372+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2015-02-23T15:53:34.259368+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
2015-02-23T15:53:34.259384+00:00 app[web.1]: [2015-02-23 15:53:34 +0000] [10] [INFO] Worker exiting (pid: 10)
2015-02-23T15:53:34.263948+00:00 app[web.1]: /app/static/
2015-02-23T15:53:34.259379+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 627, in configure
2015-02-23T15:53:34.270683+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2015-02-23T15:53:34.259369+00:00 app[web.1]: django.setup()
2015-02-23T15:53:34.270675+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 503, in spawn_worker
2015-02-23T15:53:34.270681+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 116, in init_process
2015-02-23T15:53:34.259377+00:00 app[web.1]: dictConfigClass(config).configure()
2015-02-23T15:53:34.270693+00:00 app[web.1]: return self.load_wsgiapp()
2015-02-23T15:53:34.270690+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2015-02-23T15:53:34.270592+00:00 app[web.1]: [2015-02-23 15:53:34 +0000] [9] [ERROR] Exception in worker process:
2015-02-23T15:53:34.270598+00:00 app[web.1]: Traceback (most recent call last):
2015-02-23T15:53:34.270679+00:00 app[web.1]: worker.init_process()
2015-02-23T15:53:34.270697+00:00 app[web.1]: return util.import_app(self.app_uri)
2015-02-23T15:53:34.259380+00:00 app[web.1]: '%r: %s' % (name, e))
2015-02-23T15:53:34.270699+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 355, in import_app
2015-02-23T15:53:34.259382+00:00 app[web.1]: ValueError: Unable to configure logger 'django_request': Unable to add handler 'request_handler': 'request_handler'
2015-02-23T15:53:34.270709+00:00 app[web.1]: django.setup()
2015-02-23T15:53:34.270707+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
2015-02-23T15:53:34.270695+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2015-02-23T15:53:34.270701+00:00 app[web.1]: __import__(module)
2015-02-23T15:53:34.270711+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 20, in setup
2015-02-23T15:53:34.270688+00:00 app[web.1]: self.callable = self.load()
2015-02-23T15:53:34.270716+00:00 app[web.1]: logging_config_func(logging_settings)
2015-02-23T15:53:34.270715+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/log.py", line 87, in configure_logging
2015-02-23T15:53:34.270732+00:00 app[web.1]: dictConfigClass(config).configure()
2015-02-23T15:53:34.270685+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2015-02-23T15:53:34.270734+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 627, in configure
2015-02-23T15:53:34.270705+00:00 app[web.1]: application = get_wsgi_application()
2015-02-23T15:53:34.270739+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 503, in spawn_worker
2015-02-23T15:53:34.270737+00:00 app[web.1]: ValueError: Unable to configure logger 'django_request': Unable to add handler 'request_handler': 'request_handler'
2015-02-23T15:53:34.270738+00:00 app[web.1]: Traceback (most recent call last):
2015-02-23T15:53:34.270713+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2015-02-23T15:53:34.270744+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2015-02-23T15:53:34.270703+00:00 app[web.1]: File "/app/django_test/wsgi.py", line 14, in <module>
2015-02-23T15:53:34.270719+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 794, in dictConfig
2015-02-23T15:53:34.270741+00:00 app[web.1]: worker.init_process()
2015-02-23T15:53:34.270746+00:00 app[web.1]: self.callable = self.load()
2015-02-23T15:53:34.270735+00:00 app[web.1]: '%r: %s' % (name, e))
2015-02-23T15:53:34.270751+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2015-02-23T15:53:34.270753+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 355, in import_app
2015-02-23T15:53:34.270749+00:00 app[web.1]: return self.load_wsgiapp()
2015-02-23T15:53:34.270755+00:00 app[web.1]: __import__(module)
2015-02-23T15:53:34.270742+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 116, in init_process
2015-02-23T15:53:34.270762+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 20, in setup
2015-02-23T15:53:34.270766+00:00 app[web.1]: logging_config_func(logging_settings)
2015-02-23T15:53:34.270756+00:00 app[web.1]: File "/app/django_test/wsgi.py", line 14, in <module>
2015-02-23T15:53:34.270759+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
2015-02-23T15:53:34.270763+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2015-02-23T15:53:34.270772+00:00 app[web.1]: '%r: %s' % (name, e))
2015-02-23T15:53:34.270769+00:00 app[web.1]: dictConfigClass(config).configure()
2015-02-23T15:53:34.270760+00:00 app[web.1]: django.setup()
2015-02-23T15:53:34.270770+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 627, in configure
2015-02-23T15:53:34.270745+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2015-02-23T15:53:34.270767+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 794, in dictConfig
2015-02-23T15:53:34.270748+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2015-02-23T15:53:34.297494+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>
2015-02-23T15:53:34.270775+00:00 app[web.1]: [2015-02-23 15:53:34 +0000] [9] [INFO] Worker exiting (pid: 9)
2015-02-23T15:53:34.297732+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 72, in run
2015-02-23T15:53:34.297484+00:00 app[web.1]: Traceback (most recent call last):
2015-02-23T15:53:34.297561+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
2015-02-23T15:53:34.297530+00:00 app[web.1]: sys.exit(run())
2015-02-23T15:53:34.297607+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2015-02-23T15:53:34.270752+00:00 app[web.1]: return util.import_app(self.app_uri)
2015-02-23T15:53:34.270757+00:00 app[web.1]: application = get_wsgi_application()
2015-02-23T15:53:34.298282+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2015-02-23T15:53:34.297688+00:00 app[web.1]: super(Application, self).run()
2015-02-23T15:53:34.297774+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 197, in run
2015-02-23T15:53:34.297856+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 293, in halt
2015-02-23T15:53:34.297832+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2015-02-23T15:53:34.297946+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 338, in stop
2015-02-23T15:53:34.298042+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 210, in handle_chld
2015-02-23T15:53:34.298097+00:00 app[web.1]: self.reap_workers()
2015-02-23T15:53:34.298121+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 455, in reap_workers
2015-02-23T15:53:34.298215+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2015-02-23T15:53:34.270764+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/log.py", line 87, in configure_logging
2015-02-23T15:53:34.297751+00:00 app[web.1]: Arbiter(self).run()
2015-02-23T15:53:34.270773+00:00 app[web.1]: ValueError: Unable to configure logger 'django_request': Unable to add handler 'request_handler': 'request_handler'
2015-02-23T15:53:34.297632+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 189, in run
2015-02-23T15:53:34.297922+00:00 app[web.1]: self.stop() 2015-02-23T15:53:34.298017+00:00 app[web.1]: time.sleep(0.1)
2015-02-23T15:53:35.396979+00:00 heroku[web.1]: Process exited with status 1
2015-02-23T15:53:35.409095+00:00 heroku[web.1]: State changed from starting to crashed
2015-02-23T16:23:40.843143+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=article-django.herokuapp.com request_id=6035ffff-0fbe-40b3-b817-50bd8a2e57ce fwd="173.3.238.36" dyno= connect= service= status=503 bytes=
2015-02-23T16:23:41.044252+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=article-django.herokuapp.com request_id=86b1f5ff-aa91-43cf-9481-76e06fc54837 fwd="173.3.238.36" dyno= connect= service= status=503 bytes=
This is my LOGGING section of my settings.py file:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'mail_admins':{
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler',
'email_backend':
'django.core.mail.backends.filebased.EmailBackend',
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propogate': True,
},
}
}
So how do I go about adding request_handler? In my settings.py file or somewhere else in my project? I'd appreciate any help you can give me. Thank you.
Edit: This is my Procfile:
web: gunicorn django_test.wsgi
This is my new stacktrace after commenting out the LOGGING section:
2015-02-23T17:53:25.756819+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2015-02-23T17:53:25.756799+00:00 app[web.1]: logging_config_func(logging_settings)
2015-02-23T17:53:25.756826+00:00 app[web.1]: __import__(module)
2015-02-23T17:53:25.756811+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 503, in spawn_worker
2015-02-23T17:53:25.756821+00:00 app[web.1]: return self.load_wsgiapp()
2015-02-23T17:53:25.756825+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 355, in import_app
2015-02-23T17:53:25.756832+00:00 app[web.1]: django.setup()
2015-02-23T17:53:25.756830+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
2015-02-23T17:53:25.756809+00:00 app[web.1]: Traceback (most recent call last):
2015-02-23T17:53:25.756833+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 20, in setup
2015-02-23T17:53:25.756823+00:00 app[web.1]: return util.import_app(self.app_uri)
2015-02-23T17:53:25.763420+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2015-02-23T17:53:25.756838+00:00 app[web.1]: logging_config_func(logging_settings)
2015-02-23T17:53:25.763487+00:00 app[web.1]: worker.init_process()
2015-02-23T17:53:25.763471+00:00 app[web.1]: '%r: %s' % (name, e))
2015-02-23T17:53:25.756843+00:00 app[web.1]: '%r: %s' % (name, e))
2015-02-23T17:53:25.756845+00:00 app[web.1]: ValueError: Unable to configure logger 'django_request': Unable to add handler 'request_handler': 'request_handler'
2015-02-23T17:53:25.763438+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2015-02-23T17:53:25.763447+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
2015-02-23T17:53:25.756828+00:00 app[web.1]: File "/app/django_test/wsgi.py", line 14, in <module>
2015-02-23T17:53:25.763415+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2015-02-23T17:53:25.756841+00:00 app[web.1]: dictConfigClass(config).configure()
2015-02-23T17:53:25.756816+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2015-02-23T17:53:25.763450+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 20, in setup
2015-02-23T17:53:25.763422+00:00 app[web.1]: return self.load_wsgiapp()
2015-02-23T17:53:25.756842+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 627, in configure
2015-02-23T17:53:25.763494+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2015-02-23T17:53:25.763506+00:00 app[web.1]: django.setup()
2015-02-23T17:53:25.763453+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/log.py", line 87, in configure_logging
2015-02-23T17:53:25.763446+00:00 app[web.1]: application = get_wsgi_application()
2015-02-23T17:53:25.756829+00:00 app[web.1]: application = get_wsgi_application()
2015-02-23T17:53:25.763412+00:00 app[web.1]: worker.init_process()
2015-02-23T17:53:25.763413+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 116, in init_process
2015-02-23T17:53:25.763443+00:00 app[web.1]: __import__(module)
2015-02-23T17:53:25.763455+00:00 app[web.1]: logging_config_func(logging_settings)
2015-02-23T17:53:25.763488+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 116, in init_process
2015-02-23T17:53:25.856271+00:00 app[web.1]: time.sleep(0.1)
2015-02-23T17:53:25.763509+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2015-02-23T17:53:25.856019+00:00 app[web.1]: Arbiter(self).run()
2015-02-23T17:53:25.763495+00:00 app[web.1]: return self.load_wsgiapp()
2015-02-23T17:53:25.756836+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/log.py", line 87, in configure_logging
2015-02-23T17:53:25.756835+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2015-02-23T17:53:25.763515+00:00 app[web.1]: dictConfigClass(config).configure()
2015-02-23T17:53:25.763456+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 794, in dictConfig
2015-02-23T17:53:25.856292+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 210, in handle_chld
2015-02-23T17:53:25.763498+00:00 app[web.1]: return util.import_app(self.app_uri)
2015-02-23T17:53:25.763517+00:00 app[web.1]: '%r: %s' % (name, e))
2015-02-23T17:53:25.763449+00:00 app[web.1]: django.setup()
2015-02-23T17:53:25.763440+00:00 app[web.1]: return util.import_app(self.app_uri)
2015-02-23T17:53:25.763417+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2015-02-23T17:53:25.763468+00:00 app[web.1]: dictConfigClass(config).configure()
2015-02-23T17:53:25.763501+00:00 app[web.1]: __import__(module)
2015-02-23T17:53:25.763519+00:00 app[web.1]: ValueError: Unable to configure logger 'django_request': Unable to add handler 'request_handler': 'request_handler'
2015-02-23T17:53:25.763497+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2015-02-23T17:53:25.763469+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 627, in configure
2015-02-23T17:53:25.763505+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
2015-02-23T17:53:25.855770+00:00 app[web.1]: sys.exit(run())
2015-02-23T17:53:25.756839+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 794, in dictConfig
2015-02-23T17:53:25.763499+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 355, in import_app
2015-02-23T17:53:25.763490+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2015-02-23T17:53:25.763452+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2015-02-23T17:53:25.763485+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 503, in spawn_worker
2015-02-23T17:53:25.763419+00:00 app[web.1]: self.callable = self.load()
2015-02-23T17:53:25.855879+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 189, in run
2015-02-23T17:53:25.763444+00:00 app[web.1]: File "/app/django_test/wsgi.py", line 14, in <module>
2015-02-23T17:53:25.756873+00:00 app[web.1]: [2015-02-23 17:53:25 +0000] [10] [INFO] Worker exiting (pid: 10)
2015-02-23T17:53:25.763482+00:00 app[web.1]: ValueError: Unable to configure logger 'django_request': Unable to add handler 'request_handler': 'request_handler'
2015-02-23T17:53:25.763508+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 20, in setup
2015-02-23T17:53:25.856457+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2015-02-23T17:53:25.763484+00:00 app[web.1]: Traceback (most recent call last):
2015-02-23T17:53:25.763503+00:00 app[web.1]: application = get_wsgi_application()
2015-02-23T17:53:25.763502+00:00 app[web.1]: File "/app/django_test/wsgi.py", line 14, in <module>
2015-02-23T17:53:25.763513+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 794, in dictConfig
2015-02-23T17:53:25.855939+00:00 app[web.1]: super(Application, self).run()
2015-02-23T17:53:25.763512+00:00 app[web.1]: logging_config_func(logging_settings)
2015-02-23T17:53:25.763404+00:00 app[web.1]: [2015-02-23 17:53:25 +0000] [9] [ERROR] Exception in worker process:
2015-02-23T17:53:25.763525+00:00 app[web.1]: [2015-02-23 17:53:25 +0000] [9] [INFO] Worker exiting (pid: 9)
2015-02-23T17:53:25.855802+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
2015-02-23T17:53:25.763510+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/log.py", line 87, in configure_logging
2015-02-23T17:53:25.855859+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2015-02-23T17:53:25.763408+00:00 app[web.1]: Traceback (most recent call last):
2015-02-23T17:53:25.855961+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 72, in run
2015-02-23T17:53:25.856205+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 338, in stop
2015-02-23T17:53:25.856371+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 455, in reap_workers
2015-02-23T17:53:25.856348+00:00 app[web.1]: self.reap_workers()
2015-02-23T17:53:25.763516+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 627, in configure
2015-02-23T17:53:25.856041+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 197, in run
2015-02-23T17:53:25.763410+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 503, in spawn_worker
2015-02-23T17:53:25.856532+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2015-02-23T17:53:25.855664+00:00 app[web.1]: Traceback (most recent call last):
2015-02-23T17:53:25.855710+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>
2015-02-23T17:53:25.763441+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 355, in import_app
2015-02-23T17:53:25.856111+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 293, in halt
2015-02-23T17:53:25.763491+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2015-02-23T17:53:25.763492+00:00 app[web.1]: self.callable = self.load()
2015-02-23T17:53:25.856088+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2015-02-23T17:53:25.856178+00:00 app[web.1]: self.stop()
2015-02-23T17:53:26.778703+00:00 heroku[web.1]: State changed from starting to crashed
2015-02-23T17:53:26.762631+00:00 heroku[web.1]: Process exited with status 1
2015-02-23T17:53:38.945408+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=article-django.herokuapp.com request_id=99a1609e-5870-4dd9-972a-c7d6404a12f3 fwd="173.3.238.36" dyno= connect= service= status=503 bytes=
2015-02-23T17:53:39.134485+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=article-django.herokuapp.com request_id=7dcdfb81-9e0a-447b-813a-0b4d4a40b962 fwd="173.3.238.36" dyno= connect= service= status=503 bytes=

Heroku App Crashed Django

I am trying to deploy my Django website onto Heroku but when I load my site, I get this error:
Application Error:
An error occurred in the application and your page could not be
served. Please try again in a few moments.
If you are the application owner, check your logs for details.
So I type heroku logs and this is what I got:
2015-02-20T15:49:36.361800+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 116, in init_process
2015-02-20T15:49:36.361809+00:00 app[web.1]: return util.import_app(self.app_uri)
2015-02-20T15:49:36.361801+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2015-02-20T15:49:36.361803+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2015-02-20T15:49:36.361805+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2015-02-20T15:49:36.361808+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2015-02-20T15:49:36.361811+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 355, in import_app
2015-02-20T15:49:36.361815+00:00 app[web.1]: application = get_wsgi_application()
2015-02-20T15:49:36.361817+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
2015-02-20T15:49:36.361812+00:00 app[web.1]: __import__(module)
2015-02-20T15:49:36.361819+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 20, in setup
2015-02-20T15:49:36.361814+00:00 app[web.1]: File "/app/django_test/wsgi.py", line 14, in <module>
2015-02-20T15:49:36.361818+00:00 app[web.1]: django.setup()
2015-02-20T15:49:36.361823+00:00 app[web.1]: logging_config_func(logging_settings)
2015-02-20T15:49:36.361821+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2015-02-20T15:49:36.361822+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/log.py", line 87, in configure_logging
2015-02-20T15:49:36.361829+00:00 app[web.1]: '%r: %s' % (name, e))
2015-02-20T15:49:36.361830+00:00 app[web.1]: ValueError: Unable to configure handler 'default': [Errno 2] No such file or directory: '/app/logs/mylog.log'
2015-02-20T15:49:36.361929+00:00 app[web.1]: [2015-02-20 15:49:36 +0000] [9] [INFO] Worker exiting (pid: 9)
2015-02-20T15:49:36.361825+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 794, in dictConfig
2015-02-20T15:49:36.361828+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 576, in configure
2015-02-20T15:49:36.361826+00:00 app[web.1]: dictConfigClass(config).configure()
2015-02-20T15:49:36.488086+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 503, in spawn_worker
2015-02-20T15:49:36.488087+00:00 app[web.1]: worker.init_process()
2015-02-20T15:49:36.488090+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2015-02-20T15:49:36.488092+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2015-02-20T15:49:36.488093+00:00 app[web.1]: self.callable = self.load()
2015-02-20T15:49:36.488089+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 116, in init_process
2015-02-20T15:49:36.488103+00:00 app[web.1]: File "/app/django_test/wsgi.py", line 14, in <module>
2015-02-20T15:49:36.488099+00:00 app[web.1]: return util.import_app(self.app_uri)
2015-02-20T15:49:36.488100+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 355, in import_app
2015-02-20T15:49:36.488101+00:00 app[web.1]: __import__(module)
2015-02-20T15:49:36.488082+00:00 app[web.1]: [2015-02-20 15:49:36 +0000] [10] [ERROR] Exception in worker process:
2015-02-20T15:49:36.488076+00:00 app[web.1]: /app/static/
2015-02-20T15:49:36.488084+00:00 app[web.1]: Traceback (most recent call last):
2015-02-20T15:49:36.488106+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
2015-02-20T15:49:36.488108+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 20, in setup
2015-02-20T15:49:36.488131+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 576, in configure
2015-02-20T15:49:36.488111+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/log.py", line 87, in configure_logging
2015-02-20T15:49:36.488113+00:00 app[web.1]: logging_config_func(logging_settings)
2015-02-20T15:49:36.488095+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2015-02-20T15:49:36.488133+00:00 app[web.1]: ValueError: Unable to configure handler 'default': [Errno 2] No such file or directory: '/app/logs/mylog.log'
2015-02-20T15:49:36.488140+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2015-02-20T15:49:36.488136+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 503, in spawn_worker
2015-02-20T15:49:36.488096+00:00 app[web.1]: return self.load_wsgiapp()
2015-02-20T15:49:36.488141+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2015-02-20T15:49:36.488143+00:00 app[web.1]: self.callable = self.load()
2015-02-20T15:49:36.488097+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2015-02-20T15:49:36.488148+00:00 app[web.1]: return util.import_app(self.app_uri)
2015-02-20T15:49:36.488104+00:00 app[web.1]: application = get_wsgi_application()
2015-02-20T15:49:36.488153+00:00 app[web.1]: File "/app/django_test/wsgi.py", line 14, in <module>
2015-02-20T15:49:36.488110+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2015-02-20T15:49:36.488158+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 20, in setup
2015-02-20T15:49:36.488157+00:00 app[web.1]: django.setup()
2015-02-20T15:49:36.488160+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2015-02-20T15:49:36.488150+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 355, in import_app
2015-02-20T15:49:36.488107+00:00 app[web.1]: django.setup()
2015-02-20T15:49:36.488151+00:00 app[web.1]: __import__(module)
2015-02-20T15:49:36.488163+00:00 app[web.1]: logging_config_func(logging_settings)
2015-02-20T15:49:36.488114+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 794, in dictConfig
2015-02-20T15:49:36.488132+00:00 app[web.1]: '%r: %s' % (name, e))
2015-02-20T15:49:36.488129+00:00 app[web.1]: dictConfigClass(config).configure()
2015-02-20T15:49:36.488164+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 794, in dictConfig
2015-02-20T15:49:36.488165+00:00 app[web.1]: dictConfigClass(config).configure()
2015-02-20T15:49:36.488168+00:00 app[web.1]: '%r: %s' % (name, e))
2015-02-20T15:49:36.488139+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 116, in init_process
2015-02-20T15:49:36.488135+00:00 app[web.1]: Traceback (most recent call last):
2015-02-20T15:49:36.488137+00:00 app[web.1]: worker.init_process()
2015-02-20T15:49:36.488167+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 576, in configure
2015-02-20T15:49:36.507131+00:00 app[web.1]: super(Application, self).run()
2015-02-20T15:49:36.507076+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 189, in run
2015-02-20T15:49:36.488146+00:00 app[web.1]: return self.load_wsgiapp()
2015-02-20T15:49:36.488144+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2015-02-20T15:49:36.507001+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
2015-02-20T15:49:36.506915+00:00 app[web.1]: Traceback (most recent call last):
2015-02-20T15:49:36.506970+00:00 app[web.1]: sys.exit(run())
2015-02-20T15:49:36.507154+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 72, in run
2015-02-20T15:49:36.507531+00:00 app[web.1]: self.reap_workers()
2015-02-20T15:49:36.507476+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 210, in handle_chld
2015-02-20T15:49:36.507269+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2015-02-20T15:49:36.488147+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2015-02-20T15:49:36.488154+00:00 app[web.1]: application = get_wsgi_application()
2015-02-20T15:49:36.488171+00:00 app[web.1]: [2015-02-20 15:49:36 +0000] [10] [INFO] Worker exiting (pid: 10)
2015-02-20T15:49:36.507190+00:00 app[web.1]: Arbiter(self).run()
2015-02-20T15:49:36.507453+00:00 app[web.1]: time.sleep(0.1)
2015-02-20T15:49:36.507056+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2015-02-20T15:49:36.507382+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 338, in stop
2015-02-20T15:49:36.507715+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2015-02-20T15:49:36.488161+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/log.py", line 87, in configure_logging
2015-02-20T15:49:36.488170+00:00 app[web.1]: ValueError: Unable to configure handler 'default': [Errno 2] No such file or directory: '/app/logs/mylog.log'
2015-02-20T15:49:36.507292+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 293, in halt
2015-02-20T15:49:36.507213+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 197, in run
2015-02-20T15:49:36.507642+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2015-02-20T15:49:36.507358+00:00 app[web.1]: self.stop()
2015-02-20T15:49:36.488155+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
2015-02-20T15:49:36.506923+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>
2015-02-20T15:49:36.507554+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 455, in reap_workers
2015-02-20T15:49:37.304329+00:00 heroku[web.1]: State changed from up to crashed
2015-02-20T15:49:37.292485+00:00 heroku[web.1]: Process exited with status 1
2015-02-20T15:49:36.299215+00:00 heroku[web.1]: State changed from starting to up
2015-02-20T15:49:42.613930+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=article-django.herokuapp.com request_id=5e18c64f-98b1-4f2b-a88b-c9d93a0908e9 fwd="173.3.238.36" dyno=web.1 connect=5001ms service= status=503 bytes=
I looked at this log and it seems like the main problem is something with '/app/logs/mylog.log' not existing. If that's the case, how I do I create that file?
Edit: Here is the LOGGING section of my settings.py file:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'mail_admins':{
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler',
'email_backend':
'django.core.mail.backends.filebased.EmailBackend',
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propogate': True,
},
}
}
/app is directory in which your application is put on Heroku. Try to add logs directory in root of your project and push it to Heroku - directory will then exist so log file should be created without problems.