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

ConnPool.Get blocked by slow connections #69

Open
yogipatel opened this issue Sep 3, 2018 · 0 comments
Open

ConnPool.Get blocked by slow connections #69

yogipatel opened this issue Sep 3, 2018 · 0 comments

Comments

@yogipatel
Copy link

I'm connecting to a server that is taking ~10 seconds to connect to. Using the connection pool, I'm observing an odd behavior where even if there are free connections available, ConnPool.Get is blocking until the other connection completes. Once established, everything seems to work as expected, but cold starts are painfully slow, particularly when a large pool is used (I believe the default is 100 connections).

On a cursory look, the pooling implementation's use of both poolGuard and poolMutex looks a bit suspect, but I haven't thought about it too much. If this isn't by design, perhaps we can figure out a way to handle this case?

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

No branches or pull requests

1 participant