#31373: Django 3.x / uwsgi is leaking connections
-------------------------------+--------------------------------------
Reporter: Marcin Nowak | Owner: nobody
Type: Uncategorized | Status: closed
Component: Uncategorized | Version: 3.0
Severity: Normal | Resolution: needsinfo
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 Marcin Nowak):
Replying to [comment:10 Simon Charette]:
> I understand your desire to see this addressed but without a simplified
test project that reproduces your issue it's impossible to determine
whether or not Django is at fault and its not one of your projects third-
party app that is.
>
> Please reopen this issue if you can provide a reproduction case else
it's simply not actionable by triagers that don't have access to the
project you're trying to upgrade. Thanks!
The case about not reusing db connections is reproducible.
1. Just create a new project
2. Setup postgresql_psycopg2 db, set CONN_MAX_AGE=30,
3. create view hitting the database (User.objects.count() for example),
bind it to "/" route
4. make sure your postgres has connection limit set to quite low value
(mine is 100)
5. manage.py runserver
6. run `ab -c 10 -n 200 https://127.0.0.1:8000/`
My case from production server is quite different, maybe related somehow.
There is a chance that my project is causing the issue, but it looks that
Django 3.x has own issue too, which maybe increases my problem. The most
significant change in my project was upgrade of Django, from 2.x to 3.x
Sorry for chaotic description. It's been 16 hour of my today's work, for
last few hours I was trying to solve the issue, find the cause (I gave up,
sorry). Now I'm working on getting Django 2.x back, backporting some 3.x
features to 2.x, so I cannot focus anymore on reproducing my issue in
isolated environment (I know how important it is).
--
Ticket URL: <https://code.djangoproject.com/ticket/31373#comment:11>
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.85a0ab3c6925be2290ed15f98b84dffe%40djangoproject.com.