-
Notifications
You must be signed in to change notification settings - Fork 594
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
requests hang if pool is shutdown before receiving response #1245
Comments
I managed to create a small sample program that reproduces the issue pretty reliably for me: https://github.com/brharrington/akka-http-issue1245 |
Thanks for the report and the reproducer, @brharrington. We'll try to have a look next week. |
I finally found time to look into this. I can reproduce the behavior with your project by playing a bit around with the timeout value. I think your explanation is correct that there's a race condition between sending in new requests and the idle-timeout. |
I understand what's going on, the pool idle-timeout is implemented by sending out Until this is fixed I'd suggest to the disable the connection-pool idle-timeout ( |
I guess one solution could be keep the PoolInterfaceActor running a bit longer as long as |
Previously, a shutdown request didn't check if there are outstanding requests so that outstanding responses were just lost.
Previously, a shutdown request didn't check if there are outstanding requests so that outstanding responses were just lost.
Previously, a shutdown request didn't check if there are outstanding requests so that outstanding responses were just lost.
…t-race =htc #1245 fix pool idle-timeout race condition
Fixed by #1311. |
Fixes race condition with the idle timeout on the host connection pool (akka/akka-http#1245).
Fixes race condition with the idle timeout on the host connection pool (akka/akka-http#1245).
Hi, |
Same issue there. The request never got sent. What interests me is that is was solved already in version 10.0.5. |
No, that was only fixed recently in 10.0.10 |
I'm seeing requests hang after a while when using a connection pool. In this case the code is using
Http().singleRequest(request)
andonComplete
is never called for the returned future. This might be the same issue as reported in #908, but if I understand correctly they have a high request rate all the time. For the case I'm seeing, I think the problem is a race condition between shutting down an idle connection pool and a new request being made using that pool. For the connections I have seen get in this state where I have detailed logging, I see it push a request to the connection just before the pool is shutdown.The idle-timeout is set to 30s. Normally I see a pattern of pushing, Received, Finished for a given connection. In the case where it hangs I see pushing and then "Slot was stopped". Snippet of log shown below:
Thus far I haven't been successful at reproducing in a controlled minimal environment.
The text was updated successfully, but these errors were encountered: