From 70034cf22614f2e5a9a215f917aba488e174ee04 Mon Sep 17 00:00:00 2001 From: abhishekkekane Date: Thu, 11 Sep 2014 23:57:15 -0700 Subject: [PATCH] Eventlet green threads not released back to pool Presently, the wsgi server allows persist connections hence even after the response is sent to the client, it doesn't close the client socket connection. Because of this problem, the green thread is not released back to the pool. In order to close the client socket connection explicitly after the response is sent and read successfully by the client, you simply have to set keepalive to False when you create a wsgi server. --- keystone/common/environment/eventlet_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keystone/common/environment/eventlet_server.py b/keystone/common/environment/eventlet_server.py index fa6d58f..269e5db 100644 --- a/keystone/common/environment/eventlet_server.py +++ b/keystone/common/environment/eventlet_server.py @@ -179,7 +179,7 @@ class Server(object): try: eventlet.wsgi.server(socket, application, custom_pool=self.pool, log=EventletFilteringLogger(logger), - debug=False) + debug=False, keepalive=False) except greenlet.GreenletExit: # Wait until all servers have completed running pass -- 1.9.1