Trouble deploying Django application with Celery to Elastic Beanstalk

I have a working django application deployed to Elastic Beanstalk. I am trying to add some asynchronous commands to it so am adding Celery. Currently I am running container commands through python.config in my .ebextensions.

I have added the command:

06startworker:
    command: "source /var/app/venv/*/bin/activate && celery -A project worker --loglevel INFO -B &"

to my python.config. When I add this command and try to deploy my elasticbeanstalk instance timesout and deployment fails.

I have confirmed that connection to my redis server is working and my application can connect to it. Checking my logs in my cfn-init.log I see: Command 01wsgipass succeeded Test failed with code 1 ... Command 06startworker succeeded

So I think that when adding the 06startworker command it is somehow interfering with my 01wsgipass command which runs fine when I dont have the start worker command.

For reference my wsgi command is:

01wsgipass: command: 'echo "WSGIPassAuthorization On" >> ../wsgi.conf' 

I'm at a bit of a loss on how to troubleshoot this from here. I'm finding the logs that I am getting are not very helpful.

Back to Top