Req #66522 [Opn]: Ping functionality
| From: | cmb@php.net | Date: | Wed, 09 Jun 2021 10:53:48 +0000 |
| Subject: | Req #66522 [Opn]: Ping functionality | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-234283@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66522&edit=1
ID: 66522
Updated by: cmb@php.net
Reported by: myselfasunder at gmail dot com
Summary: Ping functionality
Status: Open
Type: Feature/Change Request
Package: PDO related
Operating System: Linux
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
I see no particular reason not to expose the check_liveness method
if already implemented by the driver.
Previous Comments:
------------------------------------------------------------------------
[2014-01-20 15:52:39] myselfasunder at gmail dot com
Description:
------------
There is a problem with persistent MySQL connections, wherein an abrupt, broken, persistent
connection raises a "server has gone away" error. Using the original "mysql" or
newer "mysqli" extensions, this can be mitigated by doing a "ping"
(mysql_ping(), mysqli_ping(), ->ping()) before a query or other operation is attempted. If the
connection is healthy, this is a trivial check similar to a standard heartbeat. If the connection
has collapsed, it will be automatically reestablished using the original connection information.
Currently, PDO does not [obviously] support this. I am recommending that support for this
functionality be added to PDO core, and implementations be added for each driver where supported, or
be translated to a no-op for those that don't.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66522&edit=1