|  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
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
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.
Block user comment
Status: Assign to:
Bug Type:
From: tyra3l at gmail dot com
New email:
PHP Version: OS:


 [2010-11-02 12:13 UTC] tyra3l at gmail dot com
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:
the code which produce this was working fine before migrating to 5.3

Test script:

Expected result:
successful connection every time

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-20 14:22 UTC]
-Status: Open +Status: Feedback
 [2010-12-20 14:22 UTC]
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

 [2010-12-25 13:50 UTC]
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]
-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-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 05:01:29 2024 UTC