Saturday, 24 August 2013

Heroku and Django random crashes

Heroku and Django random crashes

Sometimes when I push to heroku I get a message saying:
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 then run the command
$ heroku restart
a few times and its suddenly working fine again.
The error message from heroku logs is very long, here is a snippet from
the bottom:
2013-08-25T03:30:26.824149+00:00 app[web.1]: self._setup(name)
2013-08-25T03:30:26.824453+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py",
line 132, in __init__
2013-08-25T03:30:26.824453+00:00 app[web.1]: mod =
importlib.import_module(self.SETTINGS_MODULE)
2013-08-25T03:30:26.824453+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/utils/importlib.py",
line 35, in import_module
2013-08-25T03:30:26.824453+00:00 app[web.1]: self._wrapped =
Settings(settings_module)
2013-08-25T03:30:26.824453+00:00 app[web.1]: __import__(name)
2013-08-25T03:30:26.824453+00:00 app[web.1]: File
"/app/zinnia/settings.py", line 5, in <module>
2013-08-25T03:30:26.824453+00:00 app[web.1]:
('http://django-blog-zinnia.com/xmlrpc/',))
2013-08-25T03:30:26.824453+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py",
line 53, in __getattr__
2013-08-25T03:30:26.824453+00:00 app[web.1]: self._setup(name)
2013-08-25T03:30:26.824759+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py",
line 152, in __init__
2013-08-25T03:30:26.824759+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py",
line 48, in _setup
2013-08-25T03:30:26.824759+00:00 app[web.1]: self._wrapped =
Settings(settings_module)
2013-08-25T03:30:26.824759+00:00 app[web.1]: raise
ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
2013-08-25T03:30:26.824759+00:00 app[web.1]: ImproperlyConfigured: The
SECRET_KEY setting must not be empty.
2013-08-25T03:30:26.825073+00:00 app[web.1]: 2013-08-25 03:30:26 [7]
[INFO] Worker exiting (pid: 7)
2013-08-25T03:30:26.972807+00:00 app[web.1]: 2013-08-25 03:30:26 [2]
[INFO] Shutting down: Master
2013-08-25T03:30:26.972807+00:00 app[web.1]: 2013-08-25 03:30:26 [2]
[INFO] Reason: Worker failed to boot.
2013-08-25T03:30:27.576714+00:00 heroku[web.1]: Process exited with status 0
2013-08-25T03:30:28.190167+00:00 heroku[web.1]: Process exited with status 3
2013-08-25T03:30:28.205185+00:00 heroku[web.1]: State changed from
starting to crashed
Does anyone have experience of this sort of thing?

No comments:

Post a Comment