note 30520 deleted from function.mysql-ping by didou
| From: | didou@php.net | Date: | Tue, 16 Mar 2004 09:34:13 +0000 |
| Subject: | note 30520 deleted from function.mysql-ping by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-66895@lists.php.net to get a copy of this message | ||
Note Submitter: melnabone near mindless punta com
----
>
>The true value of mysql_ping() is when your script has >already opened a valid connection and
>is in the middle of
>a lengthy operation. If your calls start to fail, you can call
>mysql_ping() to check and reestablish the connection if >need be.
>
This isn't the only angle to take! I use this as part of a server that communicates with a
cluster manager. Every thirty seconds I use mysql_ping to check that I have still have a connection
and therefore (?) a live database. If it returns false, then the server shuts down and the cluster
manager takes appropriate action.
Cheers,
BDKR