Fwd: MySQLi not closing connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---------- Forwarded message ----------
From: Fergus Gibson <fgibson75@xxxxxxxxx>
Date: Wed, Nov 26, 2008 at 11:50 AM
Subject: Re:  MySQLi not closing connections
To: Jonathan Langevin <jon@xxxxxxxxxxxxxxxxxxxx>


On Wed, Nov 26, 2008 at 10:36 AM, Jonathan Langevin
<jon@xxxxxxxxxxxxxxxxxxxx> wrote:
> I would normally think there were problems elsewhere in the code, if
> the issues didn't stop once I comment out the logging functionality.

I don't see anything that would account for your symptoms in that code
snippet, but it's important to remember that sometimes code in one
place can interact with code in another place to expose a bug.  When
your application uses ext/mysql, it uses only built-in functions.
It's only when it uses ext/mysqli that it uses a customized sub-class.
 I would look in that subclass for the problem.

But honestly, I'm flummoxed, Jon.  Since non-persistent connections
should automatically close when the script ends (normally or for an
error), I don't understand why the connections are remaining open only
when logging is enabled.  I would expect it to be a by-product of the
connection process instead or a bug.

Does the application use mysql_real_connect() or mysqli_real_connect()
at all?  If so, are you using a version of PHP pre-5.3?  There is a
bug and a bug fix for it.

http://bugs.mysql.com/bug.php?id=33831
http://bugs.php.net/bug.php?id=39457

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux