title: Nginx "Broken pipe" When Debugging Django?
body: <p>I have a Django site that uses Gunicorn and Nginx.  Occasionally, I'll have a problem that I need to debug.  In the past, I would shut down Gunicorn and Nginx, go to my Django project directory and start the Django development server ("python ./manage.py runserver 0:8000"), and then restart Nginx.  I could then insert set_trace() commands and do my debugging.  When I fixed the problem I'd shut down Nginx and then restart Gunicorn and Nginx.  I'm pretty sure this was working.</p>
  
  <p>Recently, though, I've begun having problems.  What happens now is that when I've stopped at a breakpoint, after a couple of minutes the web page that I've stopped on will change and display "404 Not Found" and if I take another step in the debugger, I'll see this error:</p>
  
  <pre><code>- Broken pipe from ('127.0.0.1', 43742)
  </code></pre>
  
  <p>This happens on my development, staging, and production servers which I'm accessing via their domain names, e.g. "web01.example.com"  (not really example).</p>
  
  <p>What is the correct way to debug my Django application on my remote servers?</p>
  
  <p>Thanks.</p>