diff --git a/neutron/wsgi.py b/neutron/wsgi.py index c617f9beb85..9d3fcf01b4c 100644 --- a/neutron/wsgi.py +++ b/neutron/wsgi.py @@ -113,10 +113,10 @@ class WorkerService(worker.NeutronWorker): class Server(object): """Server class to manage multiple WSGI sockets and applications.""" - def __init__(self, name, num_threads=1000, disable_ssl=False): + def __init__(self, name, num_threads=None, disable_ssl=False): # Raise the default from 8192 to accommodate large tokens eventlet.wsgi.MAX_HEADER_LINE = CONF.max_header_line - self.num_threads = num_threads + self.num_threads = num_threads or CONF.wsgi_default_pool_size self.disable_ssl = disable_ssl # Pool for a greenthread in which wsgi server will be running self.pool = eventlet.GreenPool(1) diff --git a/releasenotes/notes/config-wsgi-pool-size-a4c06753b79fee6d.yaml b/releasenotes/notes/config-wsgi-pool-size-a4c06753b79fee6d.yaml new file mode 100644 index 00000000000..8b471057103 --- /dev/null +++ b/releasenotes/notes/config-wsgi-pool-size-a4c06753b79fee6d.yaml @@ -0,0 +1,12 @@ +--- +prelude: > + Support configuration of greenthreads pool for WSGI. +other: + - Operators may want to tune the ``max_overflow`` and + ``wsgi_default_pool_size`` configuration options according + to the investigations outlined in this `mailing list post + `_. + The default value of ``wsgi_default_pool_size`` inherits from + that of oslo.config, which is currently 100. This is + a change in default from the previous Neutron-specific + value of 1000.