`request_finished` signal not being called with Django 1.5 and uWSGI < 1.2.6(?)
|Reported by:||jaap3||Owned by:||aaugustin|
|Severity:||Normal||Keywords:||uwsgi postgres mysql idle connections|
|Cc:||alanjds||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
As discovered on the django-users mailinglist in the thread request_finished signal not being called with Django 1.5.1 with uwsgi
The version of uWSGI in the Ubuntu/Debian apt repositories (1.0.3) doesn't call close on the wsgi application, this in turn causes the request_finished signal to never fire resulting in open database connections.
According to this blogpost uWSGI >= 1.2.6 should be the first version of uWSGI that supports the expected behavior. But the same blogpost warns about other wsgi middleware potentially misbehaving.
I'm wondering why Django < 1.5 didn't show this behavior and what the best course for Django regarding this issue is.
Should there be a warning in the docs about the minimum required uWSGI version? Or should the previous behavior be restored somehow?
Change History (17)
comment:1 Changed 9 months ago by aaugustin
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:2 Changed 9 months ago by claudep
- Component changed from Uncategorized to Documentation
- Triage Stage changed from Unreviewed to Accepted
comment:3 Changed 9 months ago by jaap3
- Owner changed from nobody to jaap3
- Status changed from new to assigned
comment:10 Changed 9 months ago by Aymeric Augustin <aymeric.augustin@…>
- Resolution set to fixed
- Status changed from assigned to closed