$ gunicorn --bind 0.0.0.0:9090 --max-requests 1 wsgi_test
[2020-03-11 10:42:21 +0100] [11524] [INFO] Starting gunicorn 19.10.0
[2020-03-11 10:42:21 +0100] [11524] [INFO] Listening at: http://0.0.0.0:9090 (11524)
[2020-03-11 10:42:21 +0100] [11524] [INFO] Using worker: sync
[2020-03-11 10:42:21 +0100] [11529] [INFO] Booting worker with pid: 11529
[11/Mar/2020:10:42:21] ENGINE Bus STARTING
[11/Mar/2020:10:42:21] ENGINE Bus STARTED
[2020-03-11 10:42:23 +0100] [11529] [INFO] Autorestarting worker after current request.
127.0.0.1 - - [11/Mar/2020:10:42:23] "GET /status HTTP/1.1" 200 17 "" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0"
[2020-03-11 10:42:23 +0100] [11529] [INFO] Worker exiting (pid: 11529)
/home/jbl/.local/lib/python3.6/site-packages/cherrypy/process/wspbus.py:258: RuntimeWarning: The main thread is exiting, but the Bus is in the states.STARTED state; shutting it down automatically now. You must either call bus.block() after start(), or call bus.exit() before the main thread exits.
'main thread exits.' % self.state, RuntimeWarning)
[11/Mar/2020:10:42:23] ENGINE Bus STOPPING
[11/Mar/2020:10:42:23] ENGINE Bus STOPPED
[11/Mar/2020:10:42:23] ENGINE Bus EXITING
[11/Mar/2020:10:42:23] ENGINE Bus EXITED
[2020-03-11 10:42:23 +0100] [11531] [INFO] Booting worker with pid: 11531
[11/Mar/2020:10:42:23] ENGINE Bus STARTING
[11/Mar/2020:10:42:23] ENGINE Bus STARTED
# encoding: utf-8
import cherrypy
cherrypy.config.update({'engine.autoreload.on': False})
cherrypy.server.unsubscribe()
cherrypy.engine.start()
class TestApp(object):
def __init__(self):
pass
@cherrypy.expose
def status(self):
return 'Server is RUNNING'
application = cherrypy.Application(TestApp())