Re: [PHP-DB] MySQLi not closing connections

[email protected] ("Fergus Gibson")
Newsgroups php.db
Message-ID <[email protected]>
On Tue, Nov 25, 2008 at 10:27 AM, Jack Mays <[email protected]> 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.