#31373: Django 3.x / uwsgi is leaking connections
-------------------------------------+-------------------------------------
     Reporter:  Marcin Nowak         |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  3.0
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson):

 Same results.

 Running on `stable/2.2.x`, just with `runserver`, I see some
 `psycopg2.OperationalError: FATAL:  sorry, too many clients already`
 errors, but it does OK — it recovers for a while, before an error again,
 and so on. (It's only runserver...)

 Upping to `stable/3.0.x`, the limit is reached and then it never recovers.

 On `stable/3.0.x`, (and `master`), reverting **just** the use of
 `asgiref.local.Local` to `threading.local` in the lines Simon identified
 in `django/db/utils.py` leads to a better-than-stable/2.2.x behaviour.
 (It's essentially the same, but errors slightly less often, so presumably
 something else changed to account for that.)

 (Disabling the auto-reloader makes no apparent difference.)

 > I suspect the problem will be with Local, as it is likely not precisely
 replicating threading.local enough

 This looks favourite then.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31373#comment:18>
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/065.69dff9e27daa6c74067e29ce5f29ff8b%40djangoproject.com.

Reply via email to