Question

Django-Gunicorn-Nginx Why do I get an Internal server error every time I restart Gunicorn?

  • Posted on September 22, 2014
  • moehabib9Asked by moehabib9

I set up a droplet on digital ocean using the one-click installer. I host my code on a git repo. and I use git pull to merge changes, followed by service gunicorn reload to restart gunicorn. The problem is that everytime I do this and try to visit my site I get an ‘internal server error’ messages, and after I refresh once or twice the actual page loads.

It is strange because I get the message even if I wait for a while (15 minutes) before visiting the web page, so I’m not sure if I get this because gunicorn was still restarting or for some other reason. Any hints on what might be going on ?

P.S. I asked the same question on StackOverflow but got no hits


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This is quite an old question but for anyone else who may be experiencing this problem, the first thing I would suggest anytime you are receiving an error from your web server is to check the web server’s logs. In this case, reviewing the logs in /var/log/nginx/error.log would likely lead to the underlying cause of the internal server error.