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/224941 /git.openstack. org/cgit/ openstack/ heat/commit/ ?id=5f86d05c50e 02a895093d4cb6e 4285dce4ba93a2
Committed: https:/
Submitter: Jenkins
Branch: stable/kilo
commit 5f86d05c50e02a8 95093d4cb6e4285 dce4ba93a2
Author: yangxurong <email address hidden>
Date: Mon Mar 30 14:39:17 2015 +1000
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 socket_ timeout = 0' means do not timeout.
real 1m0.063s
Setting 'client_
DocImpact: socket_ timeout option (default=900).
Added wsgi_keep_alive option (default=True).
Added client_
SecurityImpact
Change-Id: I303d87addeed8b 103eeb26dbcc48e 3acce06ee6a c2f186212dd27cb 4f860d3399)
Closes-Bug: #1361360
(cherry picked from commit 2be72f42f9debf9