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.
Reviewed: https:/ /review. openstack. org/162964 /git.openstack. org/cgit/ openstack/ glance/ commit/ ?id=d569ed9db9d c1941ef74d38f85 f8f67a85ff10b0
Committed: https:/
Submitter: Jenkins
Branch: stable/juno
commit d569ed9db9dc194 1ef74d38f85f8f6 7a85ff10b0
Author: abhishekkekane <email address hidden>
Date: Tue Oct 21 04:39:59 2014 -0700
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.
DocImpact:
Added http_keepalive option (default=True).
Conflicts:
doc/ source/ configuring. rst
etc/ glance- api.conf
glance/ common/ wsgi.py
glance/ tests/unit/ test_opts. py
SecurityImpact
Closes-Bug: #1361360 3096210233097dd 6b8c5440176 d2f6e940e184bd2 89b8782620)
Change-Id: I93aaca24935a4f
(cherry picked from commit 16a821e00d15520