Add timeout and workers option for Gunicorn.

Add timeout and workers option for Gunicorn,
otherwise long request and multi request won't return.

Closes-Bug: #1652861
Change-Id: If289511c2c64ecb7c09ed14e7862174358052f30
Signed-off-by: Andy Yan <yanchao3@lenovo.com>
This commit is contained in:
Andy Yan
2016-12-27 15:26:16 +08:00
parent f1d66ce2b5
commit 965cb384a6
3 changed files with 11 additions and 1 deletions

View File

@@ -45,7 +45,9 @@ class StandaloneApplication(gunicorn.app.base.BaseApplication):
def main():
options = {
'bind': '%s:%s' % (cfg.bind_host, cfg.bind_port),
'reload': cfg.debug
'reload': cfg.debug,
'timeout': cfg.timeout,
'workers': cfg.workers
}
StandaloneApplication(application, options).run()
LOG.info(("Valence Server on http://%(host)s:%(port)s"),