blaze
blaze copied to clipboard
Consider a max wait in pool manager
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.
What type of timer? One for connections, thread pool, or something else?
Connections. If it takes you N seconds to borrow a connection, the request fails and the borrow is canceled.
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)
I don't think so. I think connectTimeout
starts ticking when a connection has been obtained.
Thanks for clarifying.