3

I'm trying to run my Django app using Nginx and uWSGI. When I try to go to

127.0.0.1:8001/media/media.png

Nginx properly shows the image, but when I go to

127.0.0.1:8000/CMS/users

Django is supposed to call a view. Instead, Nginx returns a 504 Gateway Time-out. When I view the Nginx error log, it says

*6 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 127.0.0.1, server: 192.168.174.131, request: "GET /CMS/users HTTP/1.1", upstream: "uwsgi://127.0.0.1:8001", host: "127.0.0.1:8000"

Does a uWSGI error log file exist? If yes, where can I find it? (I'm searching for it because I think it might help debug the issue).

Note: I installed uwsgi using pip.

SilentDev
  • 20,997
  • 28
  • 111
  • 214
  • 1
    Use `logto` or `daemonize` startup parameter to config log file path. You can refer to this answer for some tips: http://stackoverflow.com/questions/17099114/uwsgi-works-as-process-but-not-as-daemon/#17138212 – ZZY May 11 '15 at 04:28
  • 1
    How do you run your uWSGI? Try to use `logto`. http://uwsgi-docs.readthedocs.org/en/latest/Logging.html – Edwin Lunando May 11 '15 at 10:37
  • logto does it, thanks. I run it like so: "uwsgi --http :8001 --module CMS.wsgi --logto /tmp/mylog.log". One of you can place it as the answer and I will accept it. – SilentDev May 11 '15 at 18:16

0 Answers0