Opened 5 years ago
Last modified 5 years ago
#31373 closed Bug
Django 3.x / uwsgi is leaking connections — at Version 3
Reported by: | Marcin Nowak | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 3.0 |
Severity: | Release blocker | Keywords: | |
Cc: | Andrew Godwin, Simon Charette | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Project upgraded from 2.x to 3.0.4 is leaking PostgreSQL database connections.
ATOMIC_REQUESTS=False, AUTOCOMMIT=True, CONN_MAX_AGE=0
UWSGi threads are enabled (--enable-threads
)
After few hours all posgtress connections are used (too many connections error).
pg_stat_activity is reporting idle connections with part of queries visible.
I would try to deliver more details later.
Facts:
- setting up CONN_MAX_AGE > 0 does not help
- starting
runserver
and making many calls withab -c 10 -n 100 http://127.0.0.1:8000/
uses all available connections and ends with error 500 (due to no available connections) - starting
runserver --nothreading
and making calls withab -c 100 -n 100 http://127.0.0.1:8000/
works fine
Change History (5)
by , 5 years ago
Attachment: | Firefox_Screenshot_2020-03-17T15-05-35.104Z.png added |
---|
comment:1 by , 5 years ago
Description: | modified (diff) |
---|
by , 5 years ago
Attachment: | Firefox_Screenshot_2020-03-17T19-42-34.977Z.png added |
---|
comment:2 by , 5 years ago
Description: | modified (diff) |
---|
comment:3 by , 5 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.