By Using Django Orm To Operate The Mysql Database, There Are Some Idle Mysqld. How To Close Them?
I type htop, then I got this.So we can see the TIME+ tab, there are some mysqld whose time is 00:00:00, it I want to close because it occupy lot of memories. My app have lots of j
Solution 1:
https://docs.djangoproject.com/en/1.6/ref/databases/#connection-management
There is a variable CONN_MAX_AGE
that you can set to 0 to close db connection immediately after request. But this is supposed to be default behavior. Can you check what is your CONN_MAX_AGE
is? ./manage.py diffsettings | grep CONN_MAX_AGE
will do the trick.
Post a Comment for "By Using Django Orm To Operate The Mysql Database, There Are Some Idle Mysqld. How To Close Them?"