110: Connection timed out (Nginx/Gunicorn)

前端 未结 5 608
隐瞒了意图╮
隐瞒了意图╮ 2020-11-28 23:50

I\'m running django on gunicorn+nginx. I\'m facing a problem with file uploads. Actually uploads are working fine but gunicorn times out thus causing this in nginx:

5条回答
  •  难免孤独
    2020-11-29 00:06

    This might help someone with similar problem.

    I was getting timeout error from nginx and gunicorn on my Django application. Since I was getting the timeout error from nginx, I couldn't see the real error from Django. After adding the new timeout like fijter suggested. I could see that the error was in the settings.py file.

    If you set the DEBUG to False, and didn't add the domain name in the ALLOWED_HOSTS you might get this error.

    I just added the domain in the ALLOWED_HOSTS in settings.py and the error was gone.

    Very simple solution!

提交回复
热议问题