php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53227 PHP Warning: mysql_pconnect(): MySQL server has gone away
Submitted: 2010-11-02 12:13 UTC Modified: 2013-02-18 00:34 UTC
Votes:8
Avg. Score:3.9 ± 0.8
Reproduced:8 of 8 (100.0%)
Same Version:3 (37.5%)
Same OS:1 (12.5%)
From: tyra3l at gmail dot com Assigned:
Status: No Feedback Package: MySQL related
PHP Version: 5.3.3 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
19 + 44 = ?
Subscribe to this entry?

 
 [2010-11-02 12:13 UTC] tyra3l at gmail dot com
Description:
------------
On of my co-worker experienced, that some of the mysql_pconnect calls are 
returning this error.
The exact same symptoms are described in the manual:
http://php.net/manual/en/function.mysql-pconnect.php#99380
the code which produce this was working fine before migrating to 5.3

Test script:
---------------
<?php
mysql_pconnect();

Expected result:
----------------
successful connection every time

Actual result:
--------------
sometimes we get the PHP warning, and we had to retry the connection

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-20 14:22 UTC] andrey@php.net
-Status: Open +Status: Feedback
 [2010-12-20 14:22 UTC] andrey@php.net
do you use libmysql or mysqlnd?
 [2010-12-20 14:34 UTC] tyra3l at gmail dot com
-Status: Feedback +Status: Open
 [2010-12-20 14:34 UTC] tyra3l at gmail dot com
mysqlnd

Tyrael
 [2010-12-25 13:50 UTC] kalle@php.net
Afair, we already have some checking code in the common connector function for ext/mysql to check for "server has gone away" when attempting to re-use a persistent connection. But it is hard to reproduce if the result isn't consistent.

I tried to reproduce it a few times, but without luck. Any specific MySQL Server versions, or other data that could provide useful?
 [2010-12-25 13:56 UTC] kalle@php.net
-Status: Open +Status: Feedback
 [2011-08-11 23:41 UTC] php at accounts dot brycedrennan dot com
I experience the same thing. 

PHP 5.3.2, Apache 2.2.17, Windows 7 64bit
 [2012-01-25 17:19 UTC] david71rj at gmail dot com
No solution? I'm using PHP 5.3.8.
 [2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Dec 07 04:05:52 2022 UTC