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.
Add a parameter to take advantage of the new(ish) eventlet socket timeout
behaviour. Allows closing idle client connections after a period of
time, eg:
$ time nc localhost 8776
real 1m0.063s
Setting 'client_socket_timeout = 0' means do not timeout.
Reviewed: https:/ /review. openstack. org/130843 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=04d7a724fdf 80db51e73f12c5b 8c982db9310742
Committed: https:/
Submitter: Jenkins
Branch: master
commit 04d7a724fdf80db 51e73f12c5b8c98 2db9310742
Author: abhishekkekane <email address hidden>
Date: Tue Oct 21 01:37:42 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.
Add a parameter to take advantage of the new(ish) eventlet socket timeout
behaviour. Allows closing idle client connections after a period of
time, eg:
$ time nc localhost 8776
real 1m0.063s
Setting 'client_ socket_ timeout = 0' means do not timeout.
DocImpact: socket_ timeout option (default=900).
Added wsgi_keep_alive option (default=True).
Added client_
SecurityImpact
Closes-Bug: #1361360 26fd306c423de8d cea8520d2aa
Change-Id: I399b812f6d4522