commit 0ea37b36a11fc556f4e7ac9c56fde33e150a75ed
Author: Don Penney <email address hidden>
Date: Mon Mar 11 10:52:00 2019 -0400
Trigger garbage collection to free WSGI resources
The wsgiref.simple_server is used by patching for handling
API requests. When uploading files, the server opens a file
handle for the temporary resource, but does not close it.
Instead, it's left to periodic garbage collection to free the
resources. Until garbage collection, however, this means
disk space is still in use for the deleted temporary file,
as the handle is left open.
This update adds a call to gc.collect() after the call
to simple_server.handle_request() to immediately free all
unused resources.
Change-Id: Ie39213dad540448cede46cc8e580d31582419dcc
Closes-Bug: 1797977
Signed-off-by: Don Penney <email address hidden>
Reviewed: https:/ /review. openstack. org/642526 /git.openstack. org/cgit/ openstack/ stx-update/ commit/ ?id=0ea37b36a11 fc556f4e7ac9c56 fde33e150a75ed
Committed: https:/
Submitter: Zuul
Branch: master
commit 0ea37b36a11fc55 6f4e7ac9c56fde3 3e150a75ed
Author: Don Penney <email address hidden>
Date: Mon Mar 11 10:52:00 2019 -0400
Trigger garbage collection to free WSGI resources
The wsgiref. simple_ server is used by patching for handling
API requests. When uploading files, the server opens a file
handle for the temporary resource, but does not close it.
Instead, it's left to periodic garbage collection to free the
resources. Until garbage collection, however, this means
disk space is still in use for the deleted temporary file,
as the handle is left open.
This update adds a call to gc.collect() after the call server. handle_ request( ) to immediately free all
to simple_
unused resources.
Change-Id: Ie39213dad54044 8cede46cc8e580d 31582419dcc
Closes-Bug: 1797977
Signed-off-by: Don Penney <email address hidden>