When I tried to run the gunicorn directly, it worked:
gunicorn -b 127.0.0.1:8081 ecerp.wsgi --chdir /var/www/django/ecerp_set/demo/ecerp/
But I kept trying with failed when using circus.
[circus]
check_delay = 5
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556
statsd = true
[watcher:ecerp]
cmd = gunicorn
args = -b 127.0.0.1:8081 ecerp.wsgi
working_dir = /var/www/django/ecerp_set/demo/ecerp
send_hup = true
And when I run circusctl
, it shows that the app ecerp
did not run:
root@vps3:~# circusctl
circusctl 0.11.1
ecerp: stopped
(circusctl)
Please help me point out where is wrong? I've spent half a day on it, thanks very much!
I tried using circus, then runit, somehow it just wan not figuring. That is when I turned to using Systemd option
I tried using the systemd option and it worked, I have published the answer here..
https://askubuntu.com/questions/930589/running-upstart-script-on-17-04/1010398#1010398