Bug #12392 Updated: mysql_pconnect() and timed-out connections
ID: 12392
User updated by: carl@thep.lu.se.NOSPAM
Reported By: carl@thep.lu.se.NOSPAM
Status: Closed
Bug Type: MySQL related
Operating System:
PHP Version: 4.0.6
New Comment:
Probably some root user fooling around. A script, I'd guess.
Previous Comments:
------------------------------------------------------------------------
[2001-07-26 05:54:23] carl@thep.lu.se.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().
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12392&edit=1
Thread (4 messages)