I built a Django project using the latest version of cookiecutter-django, which seems to be working fine on my local computer as well as when I run it through python manage.py runserver
using the various settings files. I'm trying to test my Gunicorn server on Digital Ocean (running Ubuntu 16.04) but for some reason can't get the server to run properly when production.py
is the one being used.
When I do the following command on bash:
gunicorn --bind 0.0.0.0:8000 --env DJANGO_SETTINGS_MODULE=config.settings.test --preload config.wsgi
everything works fine and I get these:
[2018-02-18 23:31:14 -0500] [31662] [INFO] Starting gunicorn 19.7.1
[2018-02-18 23:31:14 -0500] [31662] [INFO] Listening at: http://0.0.0.0:8000 (31662)
[2018-02-18 23:31:14 -0500] [31662] [INFO] Using worker: sync
[2018-02-18 23:31:14 -0500] [31666] [INFO] Booting worker with pid: 31666
But when I don't specify the settings file and default to production.py
with gunicorn --bind 0.0.0.0:8000 --preload config.wsgi
, where the environment variable DJANGO_SETTINGS_MODULE
is set to config.settings.production
, I only get these:
DEBUG 2018-02-18 23:31:55,786 base 31681 140442914699008 Configuring Raven for host: <raven.conf.remote.RemoteConfig object at 0x7fbb5cc0b668>
INFO 2018-02-18 23:31:55,786 base 31681 140442914699008 Raven is not configured (logging is disabled). Please see the documentation for more information.
And it pretty much just gets stuck there. What might be causing this issue?