Allow configuring the wsgi pool size
Expose the number of greenthreads in wsgi pool to configuration. This allows to put a limit to the number of resources like memcache connections used. DocImpact Change-Id: I6e53d6e12661ed2f42a6b543891b13eec0c8300c
This commit is contained in:
@@ -306,6 +306,10 @@
|
||||
# socket. Not supported on OS X. (integer value)
|
||||
#tcp_keepidle=600
|
||||
|
||||
# Size of the pool of greenthreads used by wsgi (integer
|
||||
# value)
|
||||
#wsgi_default_pool_size=1000
|
||||
|
||||
|
||||
#
|
||||
# Options defined in nova.api.auth
|
||||
|
||||
@@ -64,7 +64,10 @@ wsgi_opts = [
|
||||
cfg.IntOpt('tcp_keepidle',
|
||||
default=600,
|
||||
help="Sets the value of TCP_KEEPIDLE in seconds for each "
|
||||
"server socket. Not supported on OS X.")
|
||||
"server socket. Not supported on OS X."),
|
||||
cfg.IntOpt('wsgi_default_pool_size',
|
||||
default=1000,
|
||||
help="Size of the pool of greenthreads used by wsgi"),
|
||||
]
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(wsgi_opts)
|
||||
@@ -75,7 +78,7 @@ LOG = logging.getLogger(__name__)
|
||||
class Server(object):
|
||||
"""Server class to manage a WSGI server, serving a WSGI application."""
|
||||
|
||||
default_pool_size = 1000
|
||||
default_pool_size = CONF.wsgi_default_pool_size
|
||||
|
||||
def __init__(self, name, app, host='0.0.0.0', port=0, pool_size=None,
|
||||
protocol=eventlet.wsgi.HttpProtocol, backlog=128,
|
||||
|
||||
Reference in New Issue
Block a user