]
Stuart Douglas resolved WFLY-8466.
----------------------------------
Resolution: Out of Date
Socket leak when setting HTTP Content-Length and client not reading
entire response
-----------------------------------------------------------------------------------
Key: WFLY-8466
URL:
https://issues.jboss.org/browse/WFLY-8466
Project: WildFly
Issue Type: Bug
Components: Web (Undertow)
Affects Versions: 10.1.0.Final
Environment: CentOS 6.7
Reporter: Johannes Ritter
Assignee: Stuart Douglas
Labels: leak, socket
Attachments: socket_leak.tar.gz
Wildfly leaks half-open sockets if the client closes the connection before all data was
sent to the client. This only happens when the HTTP header field
"Content-Length" was manually set.
The leaked sockets can be determined by "lsof -p <process-id> | grep
identify". The relevant sockets are listed with "Can't identify
protocol".
The leak occurs if the client connection is closed (on the client side) before the server
could send the complete response.
It does not happen every time. I have attached an example application using a web browser
as client. One button click sends the request 500 times. The socket does not leak on every
button click.
*Another interesting fact is, that the socket will also leak if a Content-Length larger
than the actual response data is set.* This is independent from the client's behavior.