Skip to content
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

Consider a max wait in pool manager #654

Open
rossabaker opened this issue Jan 5, 2017 · 5 comments · May be fixed by #681
Open

Consider a max wait in pool manager #654

rossabaker opened this issue Jan 5, 2017 · 5 comments · May be fixed by #681

Comments

@rossabaker
Copy link
Member

http4s/http4s#796 was a bug, but it's too easy to deadlock a server. We should consider a timer so borrows don't hang indefinitely for the next time we or our an app does something stupid.

@bryce-anderson
Copy link
Member

What type of timer? One for connections, thread pool, or something else?

@rossabaker
Copy link
Member Author

Connections. If it takes you N seconds to borrow a connection, the request fails and the borrow is canceled.

@vasilmkd
Copy link
Contributor

Is this not addressed by connectTimeout?

final class ClientChannelFactory(
    bufferSize: Int = DefaultBufferSize,
    group: Option[AsynchronousChannelGroup] = None,
    channelOptions: ChannelOptions = ChannelOptions.DefaultOptions,
    scheduler: TickWheelExecutor = Execution.scheduler,
    connectTimeout: Duration = Duration.Inf)

@rossabaker
Copy link
Member Author

I don't think so. I think connectTimeout starts ticking when a connection has been obtained.

@vasilmkd
Copy link
Contributor

Thanks for clarifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants