Please sign in to comment.
Mongo::Pool: Always try at least once to get a socket.
On heavily-loaded machines with a small timeout, it is actually possible for the timeout to expire before even a single pass through the checkout loop. This results in throwing ConnectionTimeoutError's, even though nothing directly mongo-related is actually timing out or going wrong. Always pass through the loop at least once before timing out, so that we are guaranteed to find a socket if there is one immediately available.
- Loading branch information...