#34870: Memory leak when using psycopg-c with django hstore
-------------------------------------+-------------------------------------
Reporter: David | Owner: nobody
Burke |
Type: Bug | Status: new
Component: Database | Version: 4.2
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
See https://gitlab.com/bufke/psycopg-memory-leak
When running Celery, Django ORM, psycopg-c, and hstore - a memory leak
occurs.
Here's the same bug in my real project with a graphic of the memory usage
https://gitlab.com/glitchtip/glitchtip-backend/-/issues/265
I hope this is the right place to report, let me know if otherwise. It
doesn't happen without the Django ORM.
The easiest workaround is probably to use the pure python psycopg package.
I'm unsure if it can be reproduced or not without Celery but Celery seems
the easiest way to run the code 1000 times so that the leak is obvious.
Another workaround is to use a service/conf option to restart the process
periodically.
In my observations of a production server and running the memory_leak
project locally - the memory usage goes up forever and never halts. The
memory is never released. DEBUG can be True or False and it still occurs.
--
Ticket URL: <https://code.djangoproject.com/ticket/34870>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018ac8d17ee6-c22a848e-91ce-4f9d-ab18-5fd8510d5703-000000%40eu-central-1.amazonses.com.