Re: MySQLi not closing connections
| From: | Jonathan Langevin | Date: | Thu, 27 Nov 2008 15:23:25 +0000 |
| Subject: | Re: MySQLi not closing connections | ||
| References: | 1 2 3 4 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-45737@lists.php.net to get a copy of this message | ||
I was thinking the same bug, except that I'm not using real_connect
(pass login params when initializing the class), and also the issue
only occurs when logging is enabled.
I'm really at a loss here :-\
--
Jonathan Langevin
PHP Site Solutions
http://www.phpsitesolutions.com
On Wed, Nov 26, 2008 at 2:50 PM, Fergus Gibson <fgibson75@gmail.com> wrote:
> On Wed, Nov 26, 2008 at 10:36 AM, Jonathan Langevin
> <jon@phpsitesolutions.com> 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
>