circus-tent / circus

A Process & Socket Manager built with zmq
http://circus.readthedocs.org/
Other
1.55k stars 258 forks source link

running a flask app with gunicorn server using circus keeps on loading. #1074

Closed rupav closed 6 years ago

rupav commented 6 years ago

I have set up the following circus.ini file.

[circus]
 statsd = 1
 httpdp = 1

 [watcher:candis]
 cmd = /home/rupav/opensource/candisEditableVENV/bin/gunicorn  candis.app:app
 numprocesses = 3
 use_sockets = True

 [socket:web]
 host = 127.0.0.1
 port = 8000

While running my app, using - circusd --daemon circus.ini --log-output circus.log, I am getting no error in circus.log, output is -

 2018-07-17 00:40:15 circus[14794] [INFO] Starting master on pid 14794
 2018-07-17 00:40:15 circus[14794] [INFO] sockets started
 2018-07-17 00:40:15 circus[14794] [INFO] Arbiter now waiting for commands
 2018-07-17 00:40:15 circus[14794] [INFO] candis started
 2018-07-17 00:40:15 circus[14794] [INFO] circusd-stats started

But now going to localhost:8000, the app just keeps on loading, which goes on forever. And nothing is getting updated on circus.log file.

Running the same command /home/rupav/opensource/candisEditableVENV/bin/gunicorn candis.app:app directly on terminal, works fine.

Python version using in virtualenv is 3.6.3, on Ubuntu 17.10.

meitham commented 6 years ago

This should not be logged as a circus issue and is more appropriate for the circus-dev mailing list.

You have asked circus to own the port 8000, for a watcher named "web" that does not exist. And you expected gunicorn to be albe to use that socket too. I suggest deleting the [socket:web] section and restarting.