cassiusclay
cassiusclay

Reputation: 386

Django Gunicorn workers won't boot

I have a Django app I am trying to set up on an Ubunutu VPS with Gunicorn and I'm encountering an error when running gunicorn project:application -b myip:8000 . Here is the output that results:

Traceback (most recent call last):
File "/home/user/project/env/bin/gunicorn", line 11, in <module>
sys.exit(run())
File "/home/user/project/env/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/home/user/project/env/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 185, in run
super(Application, self).run()
File "/home/user/project/env/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 71, in run
Arbiter(self).run()
File "/home/user/project/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 169, in run
self.manage_workers()
File "/home/user/project/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 477, in manage_workers
self.spawn_workers()
File "/home/user/project/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 542, in spawn_workers
time.sleep(0.1 * random.random())
File "/home/user/project/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 209, in handle_chld
self.reap_workers()
File "/home/user/project/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 459, in reap_workers
raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

I installed Gunicorn with pip install gunicorn in the virtual environment. wsgi.py is present and includes the WSGI app, 'application'. I can't seem to figure out what the problem is. Any help would be greatly appreciated.

Upvotes: 4

Views: 6732

Answers (2)

Daniel Roseman
Daniel Roseman

Reputation: 599450

Unless your WSGI file is called "project.py" for some reason, you should be calling gunicorn with project.wsgi:application.

Upvotes: 0

Rustem
Rustem

Reputation: 2932

Try to run your app as manage.py runserver you have some errors there, so you application can't be loaded.

Upvotes: 5

Related Questions