From: Josh Stompro Date: Fri, 24 Jul 2015 19:20:21 +0000 (-0500) Subject: LP#1478123: fix leak of file descriptors by Apache workers X-Git-Tag: sprint4-merge-nov22~1258 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ded781a5dc2933867fd3cd41a7702bec4632fa9d;p=working%2FEvergreen.git LP#1478123: fix leak of file descriptors by Apache workers Apache backends handling TPAC requests and making requests of the added content handler were not properly closing their sockets. This patch adds a close() after the shutdown() to plug the leak. Signed-off-by: Josh Stompro Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm index cf8ea003e4..be1a402d53 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm @@ -574,7 +574,10 @@ sub added_content_stage2 { } } # To avoid a lot of hanging connections. - $content->{request}->shutdown(2) if ($content->{request}); + if ($content->{request}) { + $content->{request}->shutdown(2); + $content->{request}->close(); + } } }