php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #66522 Ping functionality
Submitted: 2014-01-20 15:52 UTC Modified: 2017-10-24 08:29 UTC
Votes:4
Avg. Score:4.5 ± 0.5
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:3 (75.0%)
From: myselfasunder at gmail dot com Assigned:
Status: Open Package: PDO related
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: myselfasunder at gmail dot com
New email:
PHP Version: OS:

 

 [2014-01-20 15:52 UTC] 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.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-24 08:29 UTC] kalle@php.net
-Package: PDO Core +Package: PDO related
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Oct 20 08:01:26 2019 UTC