u/THEGrp

▲ 0 r/django

Is this Query Leak?

https://preview.redd.it/q5gdp6srq6wg1.png?width=1215&format=png&auto=webp&s=3b6f21edf9c7afe022308828523cf4258bcd3ad8

Hi, is his query leak? The number of DB Total queries goes down after restart. How would you debug where could be the issue? I suspect there might be issue with the celery, I am running task every minute there, but does not correlate well as there are sometimes "empty spaces" where the leak does not happen or there is some query 4x in one minute. I tried to debug it to see what's happening but it's useless. AI doesn't know shit also (as expected). I also tried to revise every part of code and what I thought would fix it has failed so far ...

About my project, it is Python 3.12, django 5.2, running celery 5.5 / I am running this as my pet/side project and cant pinpoint with what commit did this happened first as my retention on prometheus does not get that far.

I am using https://github.com/django-commons/django-prometheus for collecting the data and the query you see is as follows:

sum(irate(app_django_db_execute_total[$__rate_interval])) by (vendor)sum(irate(app_django_db_execute_total[$__rate_interval])) by (vendor)

Any ideas? I'm out of them.

reddit.com
u/THEGrp — 2 days ago