]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Eventlet green threads not released back to pool
authorabhishekkekane <abhishek.kekane@nttdata.com>
Tue, 21 Oct 2014 11:15:15 +0000 (04:15 -0700)
committerabhishekkekane <abhishek.kekane@nttdata.com>
Sat, 27 Dec 2014 19:13:46 +0000 (11:13 -0800)
commit8e7a0dbb12082f6159d98a4628fb8a6fcd05e95a
tree4a356e127f594357eb348d57c047963569236658
parent3ff7a49c5b3620442c5b6d9750f2d8f9bcd38c58
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.

Added 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:
Added wsgi_keep_alive option (default=True).
Added client_socket_timeout option (default=900).

SecurityImpact

Closes-Bug: #1361360
Change-Id: I3a361d6590d1800b85791f23ac1cdfd79815341b
etc/neutron.conf
neutron/wsgi.py