Welcome Guest, Not a member yet? Register   Sign In
URGENT: CI not releasing mysql processes and as such httpd is keeping the connections open

Just gone live with a high traffic site which has ground to a halt because CI seems to be keeping connections open, despite pconnect being set to FALSE.

What needs to happen to solve this?

That seems odd to me as in the database/DB_driver.php file there is this line
$this->conn_id = ($this->pconnect == FALSE) ? $this->db_connect() : $this->db_pconnect();
And the db_connect method lead to the database driver method, for example the mysql driver
function db_connect()
   if ($this->port != '')
        $this->hostname .= ':'.$this->port;
   return @mysql_connect($this->hostname, $this->username, $this->password, TRUE);
In the codeigniter.php file in the end the connection is closed explicitly in case it's not closed by the garbage collector.

Try connecting to the database with php native functions and look if the connection is persistent too, or not.

Thanks - that is what I thought.

Sadly I don't have access to the server it is on but I am being told codeigniter is responsible for creating tonnes of connections and/or locking queries.

What would cause queries to be locked (sorry I don't understand a lot about this!).

Theme © iAndrew 2016 - Forum software by © MyBB