Re: MySQLi not closing connections

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

 



On Tue, Nov 25, 2008 at 10:27 AM, Jack Mays <list-php-db@xxxxxxxxxxxx> wrote:
> I'm not sure why the connections are staying open, but I would suggest using
> mysqli_real_connect with the flag to timout connections.
[...]
> If this is way off base, let me know.

Jack, I think Jon shouldn't implement this suggestion.  Adjusting the
timeout isn't a good way to address spawning a plethora of
connections.  Jon should find and fix the bug that is causing so many
connections to be opened or to persist in the first place rather than
simply asking the database to close connections more quickly (your
suggestion).  Opening or maintaining all those connections is a big
waste of resources in the first place.  Logically, it's also bad form
to make the connections close faster than they should because that
means more resources will be used setting up and tearing down
connections.

I'm all for timeout tuning, but it's a separate issue here.

-- 
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