I am having trouble with MySQL connections not be closed. After a little while I hit the MySQL 'max_connections' limit and my CGI starts throwing exceptions.
Background:
Python 2.2 (#1, Apr 12 2002, 15:29:57) [GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2
MySQL-python-0.9.2 installed from source
MySQL Server and Client: 4.0.2-alpha-Max
Basically every MySQLdb.connect call increments the MySQL connection count seen with:
mysql> show status like 'connec%';
but neither db.close() or cur.close() seems to actually close a connection from MySQL's point of view as the connection count doesn't decrease.
Any ideas? Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2002-08-24
Sorry. I was mistaken. The MySQL 'connections' variable shows total connections since server start, not just open connections. The traceback I was seeing must have been something else.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am having trouble with MySQL connections not be closed. After a little while I hit the MySQL 'max_connections' limit and my CGI starts throwing exceptions.
Background:
Python 2.2 (#1, Apr 12 2002, 15:29:57) [GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2
MySQL-python-0.9.2 installed from source
MySQL Server and Client: 4.0.2-alpha-Max
Basically every MySQLdb.connect call increments the MySQL connection count seen with:
mysql> show status like 'connec%';
but neither db.close() or cur.close() seems to actually close a connection from MySQL's point of view as the connection count doesn't decrease.
Any ideas? Thanks in advance.
Sorry. I was mistaken. The MySQL 'connections' variable shows total connections since server start, not just open connections. The traceback I was seeing must have been something else.