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

[eluser]tolyx[/eluser]
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?
#2

[eluser]xwero[/eluser]
That seems odd to me as in the database/DB_driver.php file there is this line
Code:
$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
Code:
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.
#3

[eluser]tolyx[/eluser]
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