php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5474 persistent connections not closed on Apache child exit
Submitted: 2000-07-09 00:24 UTC Modified: 2000-12-19 21:28 UTC
From: sasha at mysql dot com Assigned: zeev (profile)
Status: Closed Package: MySQL related
PHP Version: 4.0.1pl2 OS: Linux
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sasha at mysql dot com
New email:
PHP Version: OS:

 

 [2000-07-09 00:24 UTC] sasha at mysql dot com
Set MaxRequestPerChild to 1, set MaxClients to 1,

mysql_pconnect();

hit the script a few times,

MySQL will see a lot of Aborted_clients ( show status to see it)

the reason is that persistent connections are not closed with mysql_close() on Apache child exit - the fix would be to take care of that in the child exit hanlder.

a call to mysql_close() is  part of the protocol, and it is an error to skip it.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-10 21:50 UTC] bmcadams@php.net
I can duplicate this problem internally on my production servers, so it is definitely a valid issue.
 [2000-08-12 04:12 UTC] bmcadams@php.net
Appears to be a valid issue.
Assigned to mysql extension author for review.
 [2000-12-19 21:28 UTC] sniper@php.net
Feedback by Steven Roussey <sroussey@network54.com>
--------------------------------------------

Seems like someone changed the mysql module in PHP 4.0.4RC3 with my
suggestions for #1. Thanks!

Last thing I'm curious about is #2:
> 2) Why does _close_mysql_link use efree(link) while
> _close_mysql_plink uses just free(link)?

Now that this destructor will actually be called, I'd hate for it to cause
some type of memory problem (of course, the destructor not being called at
all was actually an even bigger memory problem).




 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 01:01:33 2024 UTC