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

RAG application leaks DB connection objects #725

Open
bhlim opened this issue Jul 8, 2024 · 1 comment
Open

RAG application leaks DB connection objects #725

bhlim opened this issue Jul 8, 2024 · 1 comment
Assignees

Comments

@bhlim
Copy link

bhlim commented Jul 8, 2024

With IAP enabled for the RAG application, the rag-frontend workload runs out of memory after a couple of days and stops serving. I traced this to a memory leak when serving http requests. With IAP, the K8s ingress server pings the http server continuously and exposes the leak more rapidly.

The culprit is at this line in frontend/container/cloud_sql.py.

This can be fixed by moving connector = Connector() into the if statement:

global db
if db is None:
connector = Connector()
db = init_connection_pool(connector)

@german-grandas
Copy link
Collaborator

Refactor made to the cloud_sql module on #648

@german-grandas german-grandas self-assigned this Sep 26, 2024
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