net-http-persistent icon indicating copy to clipboard operation
net-http-persistent copied to clipboard

Handle timeout due to pool exhaustion

Open sbfaulkner opened this issue 3 years ago • 2 comments

if the pool has no more available connections, it raises a timeout exception (ConnectionPool::TimeoutError which is a subclass of Timeout::Error)

however the ensure currently catches it and masks that exception with a ConnectionPool::Error: no connections are checked out

as far as I can tell, scoping the exception handling block a little tighter has no other impact than letting this exception through, so the consumer can actually detect the issue

any feedback/suggestions/alternatives welcome

cc @drbrain @tenderlove

sbfaulkner avatar Apr 09 '21 19:04 sbfaulkner

rebased and re-bumped version

sbfaulkner avatar Nov 09 '23 14:11 sbfaulkner

I still find this a good set of changes

rud avatar Nov 09 '23 14:11 rud