[Fixed]-Nginx, gunicorn and django timing out


The problem is not with supervisord itself, few things to consider when dealing with Nginx, Gunicorn and Django in general:

  1. Make sure the user running the app process(minimum 1 user non root not including users created by default for e.g: Nginx, Postgresql. Changes with the stack) has the right permissions and ownership to achieve it’s goals.
  2. When adding another app to your stack, you should first check the port it runs on by default, and change it to prevent port conflicts, keep in mind the difference between internal and external ports since you use Nginx as a proxy to Gunicorn(this is what causes most timeouts, happened to me several times at late night work), you can use Nginx as a proxy server and create many apps with different unique internal port for each app.

With the error log you provided for supervisor, it seems you’re running your gunicorn.sh either with a user that doesn’t have enough permissions or ownership, or executing with a wrong command.

Please provide the supervisor config file relevant to your app.

Update: seems his ip address changed.


Ah never mind. Thanks for your time.
It turned out that my ip address somehow changed which should not have happened…. Rookie mistake.


Leave a comment