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

DDTrace Causing DB Connection Leak #10498

Open
tdickman opened this issue Sep 3, 2024 · 0 comments
Open

DDTrace Causing DB Connection Leak #10498

tdickman opened this issue Sep 3, 2024 · 0 comments

Comments

@tdickman
Copy link

tdickman commented Sep 3, 2024

Summary of problem

When ddtrace is installed (whether or not apn is enabled), django leaves connections open to pgbouncer (load balances sitting in front of our postgres database).

This graph of client connections to pgbouncer from our backend system clearly shows the issue. The line is flat when we were on 1.20.19. As soon as we upgraded to ddtrace 2.11.2, we saw the number of connections start growing. All of the drops are when we restarted our backend instances or pgbouncer. The flatline at the end is when we downgraded ddtrace again.

image

Which version of dd-trace-py are you using?

2.11.2

Which version of pip are you using?

23.0.1

Which libraries and their versions are you using?

(note that this is a subset of the libraries that I can share, but should be the ones that impact it)

psycopg2-binary==2.9.9
psycogreen==1.0.2
django==4.2.15
aiohappyeyeballs==2.4.0
aiohttp==3.10.5
datadot==0.45.0

How can we reproduce your problem?

Install django 4.2.15, ddtrace 2.11.2, and psycopg2-binary 2.9.9, and connect to a backend database. Observe that the number of client connections grows. Retry with ddtrace 1.20.19 and notice that it doesn't.

What is the result that you get?

Client connection growth on database.

What is the result that you expected?

No client connection growth on database.

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