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

Connection pooling and socket errors #77

Open
didactic-drunk opened this issue May 3, 2020 · 1 comment
Open

Connection pooling and socket errors #77

didactic-drunk opened this issue May 3, 2020 · 1 comment

Comments

@didactic-drunk
Copy link
Contributor

With a large number of requests I get the following error:

Unhandled exception: Error connecting to '...': Can't assign requested address (Socket::ConnectError)

Could a connection pool with persistent connections be used instead of 1 connection per request?

@jgaskins
Copy link

@didactic-drunk That's a big part of the motivation behind crystal-lang/crystal-db#131 — I want to extract the connection pool from that shard so it can be used for other network clients like this. I'm already using it in my Redis shard and my own AWS client (not yet extracted from the app it lives in). So the application I'm working on that uses Postgres, Redis, and AWS uses the same connection pool class for all 3.

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

2 participants