Re: need mysql_ping when using mysql_pconnect?

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

 



On Tue, August 7, 2007 3:58 am, lists@xxxxxxxxxxx wrote:
> Just becasue you create a persistent connection it can still go down,
> can't it? So therefore using mysql_ping inside of scripts with plenty
> of idle time is useful?

It can still go down, for sure.

Using mysql_ping to see if it's still up at any given moment, though,
is probably a bad idea.

It can STILL go down between mysql_ping() and whatever (real) work you
want to do with mysql.

So you STILL need the same level of error-checking on your actual real
work statements.

So the ping is mostly just a waste of bandwidth.

There might be a specific use-case of 'mysql_ping', such as some kind
of "heartbeat" script that sends you an email if mysql has been down
for more than X seconds.

But you almost for sure don't want to just scatter mysql_ping
throghout normal code.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux