New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Http client pool does not re-use connection that idle-times out on CloseDelimited #1248
Comments
Thanks a lot, @jypma. I'll have a look tomorrow. |
I've found the problem. It's that too many outstanding request completions can clog the pipeline in this line: akka-http/akka-http-core/src/main/scala/akka/http/impl/engine/client/PoolConductor.scala Line 83 in 40bd7a2
The underlying problem (at least one of them) seems to be that the idle timeout doesn't fail the incoming response stream. |
The actual problem is that you don't read the response entity (which would have bad performance in any case). The thing that we didn't realize so far is that if you don't read the entity, the idle timeout won't free the slot again, so that's the bug we need to fix. We can fix this by either
|
Ah, reading the response entity on error strikes again... yes, this was originally refactored spray code, that could indeed be the culprit. Adding I'm afraid I don't know enough about the internals at this point to evaluate the proposed solutions for triggering a timeout when the response is not read. |
Very leaky abstraction that Client Pool is. |
Hi guyz, I have encountered same problem with akka http version 10.0.5 and akka version 2.5.0. |
I'm going to close this one because it is likely fixed with the new pool implementation which is the default in 10.1.x. |
When a misbehaving server just returns
503 Service Unavailable
with aConnection: close
, but then never closes the connection, we hit the internal idle-timeout on the connection pool, but that signal somehow doesn't reachPoolConductor
; it doesn't re-use that connection slot.Reproducer:
The debug logging shows the idle-timeout kicking in after 2 seconds, but nothing after that.
The text was updated successfully, but these errors were encountered: