Req #42901 [Asn->Wfx]: Add a flag to PDO_mysql for reconnection in case of timeouts
| From: | johannes@php.net | Date: | Mon, 18 Apr 2011 12:16:43 +0000 |
| Subject: | Req #42901 [Asn->Wfx]: Add a flag to PDO_mysql for reconnection in case of timeouts | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-160250@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=42901&edit=1
ID: 42901
Updated by: johannes@php.net
Reported by: soenke at jimdo dot com
Summary: Add a flag to PDO_mysql for reconnection in case of
timeouts
-Status: Assigned
+Status: Wont fix
Type: Feature/Change Request
Package: MySQL related
Operating System: Irrelevant
PHP Version: 5.2.4
Assigned To: mysql
Block user comment: N
Private report: N
New Comment:
Doing this in the driver level means that your application will
"suddenly" loose its state (transactions, temp table, session vars,
probably including encoding settings, ...) this is fine for vhost
configuration as there's not much state, in an application it's better
to do it inside an database wrapper and react properly.
Previous Comments:
------------------------------------------------------------------------
[2007-10-09 13:50:22] soenke at jimdo dot com
Here is working code from lighttpd mod_mysql_vhost:
http://trac.lighttpd.net/trac/browser/branches/lighttpd-1.4.x/src/mod_mysql_vhost.c?rev=1965
------------------------------------------------------------------------
[2007-10-09 13:45:52] soenke at jimdo dot com
Description:
------------
For long-running PHP script with database connections it would be nice
if the database driver automatically reconnects in case of a
server/network timeout.
This could be integrated with a reconnect flag for PDO.
At least in libmysqlclient >= 5.0.13 MYSQL_OPT_RECONNECT is available.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=42901&edit=1