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

Langchain::Vectorsearch::Pgvector connection pooling missing #800

Open
pedroresende opened this issue Oct 1, 2024 · 1 comment · May be fixed by #842
Open

Langchain::Vectorsearch::Pgvector connection pooling missing #800

pedroresende opened this issue Oct 1, 2024 · 1 comment · May be fixed by #842
Labels
bug Something isn't working

Comments

@pedroresende
Copy link

Describe the bug

Currently the Langchain::Vectorsearch::Pgvector each time it's initalized it starts a new db connection, which might be a problem since it doesn't have connection pool

To Reproduce

make 30 requests and the connections will be open

Expected behavior

to re-use the same connection and not start a new one

@pedroresende pedroresende added the bug Something isn't working label Oct 1, 2024
@bborn bborn linked a pull request Oct 16, 2024 that will close this issue
@bborn
Copy link
Contributor

bborn commented Oct 16, 2024

Pretty sure Sequel does use a connection pool by default (with max_connections = 4): https://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html (https://share.cleanshot.com/fJs4bWqj)

Not actually sure how to test this correctly, but @andreibondarev here's a PR to at least allow setting the max_connections on the instance: #842

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants