R
Richard Wesley
I don't know if this is really a Python question of a MySQL question,
but i am hopen that there is enough overlap that someone can help me ;-)
I have a unit test suite for our server that loads a clean database
image for many of the tests. I use
p = os.popen('mysql -u uid -ppassword mydatabase', 'w')
p.write(sql_commands)
to load the database.
While the tests are running, I find that mysql has a growing number of
"Sleeping" threads in the 'show processlist' table. Towards the end of
the test suite, the database loads start to fail with a MySQL error of
"ERROR 1040: Too many connections".
So my question would be, is there any way to shut down the child process
so that MySQL notices and cleans up after itself before it runs out of
threads?
TIA,
but i am hopen that there is enough overlap that someone can help me ;-)
I have a unit test suite for our server that loads a clean database
image for many of the tests. I use
p = os.popen('mysql -u uid -ppassword mydatabase', 'w')
p.write(sql_commands)
to load the database.
While the tests are running, I find that mysql has a growing number of
"Sleeping" threads in the 'show processlist' table. Towards the end of
the test suite, the database loads start to fail with a MySQL error of
"ERROR 1040: Too many connections".
So my question would be, is there any way to shut down the child process
so that MySQL notices and cleans up after itself before it runs out of
threads?
TIA,