PHP 4.0 Bug #5474 Updated: persistent connections not closed on Apache child exit
| From: | sniper@php.net | Date: | Wed, 20 Dec 2000 02:28:00 +0000 |
| Subject: | PHP 4.0 Bug #5474 Updated: persistent connections not closed on Apache child exit | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-41887@lists.php.net to get a copy of this message | ||
ID: 5474
Updated by: sniper
Reported By: sasha@mysql.com
Old-Status: Assigned
Status: Closed
Bug Type: MySQL related
Assigned To: zeev
Comments:
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).
Previous Comments:
---------------------------------------------------------------------------
[2000-08-12 04:12:16] bmcadams@php.net
Appears to be a valid issue.
Assigned to mysql extension author for review.
---------------------------------------------------------------------------
[2000-08-10 21:50:05] bmcadams@php.net
I can duplicate this problem internally on my production servers, so it is definitely a valid issue.
---------------------------------------------------------------------------
[2000-07-09 00:24:47] sasha@mysql.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.
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=5474