Merge "Eventlet green threads not released back to pool" into stable/icehouse
This commit is contained in:
commit
307db0c3d3
|
@ -264,6 +264,12 @@ notification_driver = neutron.openstack.common.notifier.rpc_notifier
|
|||
# enabled for various plugins for compatibility.
|
||||
# rpc_workers = 0
|
||||
|
||||
# wsgi keepalive option. Determines if connections are allowed to be held open
|
||||
# by clients after a request is fulfilled. A value of False will ensure that
|
||||
# the socket connection will be explicitly closed once a response has been
|
||||
# sent to the client.
|
||||
# wsgi_keep_alive = True
|
||||
|
||||
# Sets the value of TCP_KEEPIDLE in seconds to use for each server socket when
|
||||
# starting API server. Not supported on OS X.
|
||||
# tcp_keepidle = 600
|
||||
|
|
|
@ -76,6 +76,13 @@ socket_opts = [
|
|||
default=None,
|
||||
help=_("Private key file to use when starting "
|
||||
"the server securely")),
|
||||
cfg.BoolOpt('wsgi_keep_alive',
|
||||
default=True,
|
||||
help=_("Determines if connections are allowed to be held "
|
||||
"open by clients after a request is fulfilled. A "
|
||||
"value of False will ensure that the socket "
|
||||
"connection will be explicitly closed once a response "
|
||||
"has been sent to the client.")),
|
||||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
@ -246,7 +253,8 @@ class Server(object):
|
|||
def _run(self, application, socket):
|
||||
"""Start a WSGI server in a new green thread."""
|
||||
eventlet.wsgi.server(socket, application, custom_pool=self.pool,
|
||||
log=logging.WritableLogger(LOG))
|
||||
log=logging.WritableLogger(LOG),
|
||||
keepalive=CONF.wsgi_keep_alive)
|
||||
|
||||
|
||||
class Middleware(object):
|
||||
|
|
Loading…
Reference in New Issue