Note that there are some explanatory texts on larger screens.

plurals
  1. PODebugging Django/Gunicorn behind Nginx
    text
    copied!<p>Fresh install of Nginx, Gunicorn, Supervisor, New Relic, Django, Postgres, etc. Hitting the URL gives a big fat "Internal Server Error."</p> <p>Turning debug on in the Nginx configuration gives a whole lot of detail, but nothing that points to what is causing the 500 error (just that it is happening.)</p> <p>Next, I shut down Gunicorn via supervisorctl and started the application up via <code>python manage.py runserver</code>, hit the URL, and everything is running fine.</p> <p>Step back, shut off <code>runserver</code> and started Gunicorn manually using <code>bin/gunicorn_django</code> and this is the closest to a usable trace log that I've been able to get to:</p> <pre><code>2012-09-05 21:39:25 [5927] [ERROR] Error handling request Traceback (most recent call last): File "/somewhere/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 102, in handle_request respiter = self.wsgi(environ, resp.start_response) File "/somewhere/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 241, in __call__ response = self.get_response(request) File "/somewhere/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 82, in get_response urlconf = settings.ROOT_URLCONF File "/somewhere/local/lib/python2.7/site-packages/django/utils/functional.py", line 185, in inner return func(self._wrapped, *args) AttributeError: 'Settings' object has no attribute 'ROOT_URLCONF' </code></pre> <p>I'm not asking for an answer to what is going on here, because I know this is not enough detail to figure out much. The <code>ROOT_URLCONF</code> issue is generic and could be caused by a lot of things. My question is what are some next steps I can use to continue tracking down what is going on?</p> <p>Thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload