[PHP-WIN] Re: problems with mysql connections not closing - update

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

 



Ok, here's what I found so far.

1) wait_timeout doesn't work under windows
http://www.mysql.com/doc/en/News-4.0.15.html, 4.0.15 (dev) mysql is supposed
to fix this. In http://bugs.php.net/bug.php?id=13589 georg@php.net advises
connecting like this:

mysql_pconnect($host, $user, $pass, MYSQL_CLIENT_INTERACTIVE);

(this uses the interactive_timeout setting in mysql)

I've tried this, but interactive_timeout still doesn't kill idle
connections.

2) http://jeremy.zawodny.com/blog/archives/000173.html

halfway down the page, John Lim says:

> Yes, yes, yes. And get rid of pconnect while your at it. It is somewhat
> slower when the number of connections is at a
> slower rate, but helps keep up availablity when the server is under
stress.
> Its a tradeoff.
> At any rate, creating connections to MySQL is very fast. Faster still if
> there are cached threads. When you get rid of pconnect you can see
> how many connections are attached simultaneiously at any one time. If
> you have more than one apache/PHP server connected to the MySQL
> server, the effects can be geometric. Once you get a general feeling
> for how many are usually connected at one time, set the thread cache
> to that number.

I might mail off to John to find out the full story on pconnect. AFAIK, I'm
considering it broken for now and going back to mysql_connect.

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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux