Sleeping Database Connections on Startup with MySQL
|Reported by:||Michael Newman||Owned by:||Aymeric Augustin|
|Component:||Database layer (models, ORM)||Version:||1.4|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I am digging into this a little further, but right now, starting a new project starting it up with runserver, or gunicorn, creates a sleeping MySQL connection.
./manage.py startproject testproject cd testproject
Change the settings for a local MySQL database.
On another command prompt
Observe the 2 sleeping connections (on for the shell and one for runserver).
Removing all the default apps seems to stop the connection. Adding contenttypes creates the connection. Adding staticfiles does not. Due to this, I believe that it is some code in contenttypes that is causing this connection.
Change History (32)
comment:1 Changed 5 years ago by
|Patch needs improvement:||unset|
comment:3 follow-up: 4 Changed 5 years ago by
|Triage Stage:||Unreviewed → Accepted|
comment:9 Changed 5 years ago by
|Status:||new → closed|
comment:13 Changed 4 years ago by
|Status:||closed → reopened|
|Triage Stage:||Accepted → Ready for checkin|
comment:25 Changed 4 years ago by
|Component:||Uncategorized → Database layer (models, ORM)|
|Owner:||changed from nobody to Aymeric Augustin|
|Status:||new → assigned|
|Triage Stage:||Ready for checkin → Design decision needed|