Open pedroresende opened 1 month ago
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: https://github.com/patterns-ai-core/langchainrb/pull/842
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