Bug 450880 - Persistent PHP PDO Mysql connection failure on connection loss
Persistent PHP PDO Mysql connection failure on connection loss
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: php (Show other bugs)
5.2
All Linux
low Severity low
: rc
: ---
Assigned To: Joe Orton
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-11 11:28 EDT by David Sowder
Modified: 2014-03-03 12:22 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 17:05:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Sowder 2008-06-11 11:28:23 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14

Description of problem:
Using persistent connections with the PHP PDO driver for MySQL, use attempts fail with the following error after an existing connection is lost:

SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

Version-Release number of selected component (if applicable):
php-5.1.6-20

How reproducible:
Didn't try


Steps to Reproduce:
1. Connect to a MySQL database using the PDO MySQL driver with persistent connections turned on
2. Restart the connected to MySQL database server, causing the existing persistent connection to be lost
3. Attempt to connect to the same MySQL database using the PDO MySQL driver with persistent connections turned on and without restarting the Apache server the connection attempt is being made from

Actual Results:
I get the following exception:

SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

Expected Results:
The PDO layer detects the stale connection, reconnects and proceeds normally

Additional info:
PHP bug report: http://bugs.php.net/bug.php?id=38996
PHP cvs diff: http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/mysql_driver.c?r1=1.73&r2=1.74&view=patch
Comment 1 Joe Orton 2008-06-11 11:37:44 EDT
Thanks for the report and the upstream bug/patch reference!
Comment 2 Joe Orton 2008-06-11 11:37:56 EDT
Thanks for the report and the upstream bug/patch reference!
Comment 3 RHEL Product and Program Management 2008-06-11 11:45:43 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 8 errata-xmlrpc 2009-01-20 17:05:19 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0226.html

Note You need to log in before you can comment on or make changes to this bug.