php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12392 mysql_pconnect() and timed-out connections
Submitted: 2001-07-26 05:54 UTC Modified: 2001-09-04 19:10 UTC
From: carl at thep dot lu dot se dot NOSPAM Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.0.6 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: carl at thep dot lu dot se dot NOSPAM
New email:
PHP Version: OS:

 

 [2001-07-26 05:54 UTC] carl at thep dot lu dot se dot NOSPAM
I'm not 100% sure this isn't a bug in mysql, but here it goes:

I installed mysql 2.23.39, apache and php4.0.6 a few days ago, and
I've had to restart mysql every morning because mysql_pconnect()
fails as the connections have timed out (wait_timeout is set to 8 hours).

First this is logged by mysql (a few times):
010726  6:28:43  Aborted connection 299 to db: 'lumad' user: 'lumad' host: `localhost' (Got timeout reading communication packets)

Then when I try to pconnect PHP logs this:
[Thu Jul 26 11:23:36 2001] [error] PHP Warning:  MySQL:  Link to server lost, unable to reconnect in /export/home/carl/apache/htdocs/db.inc.php on line 8

And after a few more retries I get this:
[Thu Jul 26 11:31:46 2001] [error] PHP Warning:  Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in /export/home/carl/apache/htdocs/db.inc.php on line 8

At this point /tmp/mysql.sock has disappeared, and to get it to reappear
I have to restart mysql.
I've considered raising wait_timeout to infinity, but then there'd be problems
if a (non-php) program forgets to call mysql_close(). For now I'll just
switch to mysql_connect().

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-04 08:09 UTC] carl at thep dot lu dot se dot NOSPAM
Probably some root user fooling around. A script, I'd guess.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC