#34870: Memory leak when using psycopg-c with django hstore
-------------------------------------+-------------------------------------
     Reporter:  David Burke          |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  4.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by David Burke):

 Removing the line `hstore.register_hstore(ti, connection.connection)` in
 django/contrib/postgres/signals.py also "fixes" the leak. It appears that
 it's being registered for each celery task.
 So we have:

 - Why does celery result in calling this django signal so many times?
 - Why does a psycopg connection string parsing function leak memory when
 called many times.
 - Why does Django register it so many times.

 Personally I could use pure python psycopg and move on with life. But I
 have to think it's a common set up to use Postgres, Celery, and Django
 together. psycopg-c is what that project recommends for production usage.
 I presume HStore is just incidental and that any Django contrib Postgres
 feature would be affected.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34870#comment:3>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018ac9ee95c8-278fd893-4cdc-4d8c-8a3a-8c4387180f46-000000%40eu-central-1.amazonses.com.

Reply via email to