Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
I got a report from LINE internally where the connection was not
terminated but hung when the VM instance was shut down due to
maintenance of the underlying hypervisor.
operationComplete() was not called for Channel.write() for this
abnormal connection. There was neither a normal response nor a failure
response.
Motivation:
I got a report from LINE internally where the connection was not terminated but hung when the VM instance was shut down due to maintenance of the underlying hypervisor.
operationComplete()
was not called forChannel.write()
for this abnormal connection. There was neither a normal response nor a failure response.https://github.com/line/armeria/blob/f0ec7cb729d1fb33d238c6ea8fb9af41460ab37d/core/src/main/java/com/linecorp/armeria/client/AbstractHttpRequestHandler.java#L126-L126 As a result,
WriteTimeoutException
occurred and tried to reset the connection.https://github.com/line/armeria/blob/f0ec7cb729d1fb33d238c6ea8fb9af41460ab37d/core/src/main/java/com/linecorp/armeria/client/AbstractHttpRequestHandler.java#L331-L331
failAndReset()
callsChannel.write(Unpooled.EMPTY_BUFFER)
first and then callsChannel.close()
.https://github.com/line/armeria/blob/f0ec7cb729d1fb33d238c6ea8fb9af41460ab37d/core/src/main/java/com/linecorp/armeria/internal/common/Http1ObjectEncoder.java#L371-L374 Since
channel.write()
does not respond, the connection cannot be closed.Modifications:
HttpSession.deactivate()
tomarkUnacquirable()
for clarity.KeeyAliveHandler
by idle timeout.Result:
Fixed a bug where a connection was reused after
WriteTimeoutException
occurred.