Sean Kendle
Member
We have been getting the dreaded "Too Many Connections" error, and while I know that we can increase the number of connections, this is not the problem. The problem according to our host is that there is a query somewhere that is hanging, or potentially running and then leaving the connection open. I suspect it's from an add-on that I installed or maybe one I wrote.
1. Is there a specific way to query the database that might leave the connection open?
In my own add-ons I've been using `fetchAllKeyed()`. Does this function take care of closing the connection, garbage collection and the like?
I also found these in other add-ons, do any of them potentially open a connection without closing it? (I've removed arguments for brevity)
$this->_getDb()->fetchRow();
$db = $this->_getDb();
2. Also, is there some way to find out which query might be hanging? An Add-on or some feature I've not found in the Admin CP?
Thanks!
1. Is there a specific way to query the database that might leave the connection open?
In my own add-ons I've been using `fetchAllKeyed()`. Does this function take care of closing the connection, garbage collection and the like?
I also found these in other add-ons, do any of them potentially open a connection without closing it? (I've removed arguments for brevity)
$this->_getDb()->fetchRow();
$db = $this->_getDb();
2. Also, is there some way to find out which query might be hanging? An Add-on or some feature I've not found in the Admin CP?
Thanks!