Bug #10841 Updated: Only last(?) of multiple mysql_pconnect() connections get reused
| From: | sniper@php.net | Date: | Tue, 22 May 2001 23:46:46 +0000 |
| Subject: | Bug #10841 Updated: Only last(?) of multiple mysql_pconnect() connections get reused | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-56382@lists.php.net to get a copy of this message | ||
ID: 10841
Updated by: sniper
Reported By: Thomas.Lamy@netwake.de
Old-Status: Open
Status: Feedback
Bug Type: MySQL related
Operating system:
PHP Version: 4.0.4
Assigned To:
Comments:
Still waiting for the test results...
Previous Comments:
---------------------------------------------------------------------------
[2001-05-14 07:54:17] Thomas.Lamy@netwake.de
Ok, hang on 'till weekend (production site update neccessary :-/)
Thomas
---------------------------------------------------------------------------
[2001-05-14 07:18:41] sniper@php.net
Please try PHP 4.0.5
--Jani
---------------------------------------------------------------------------
[2001-05-13 18:50:59] Thomas.Lamy@netwake.de
After doing multiple (say 3) mysql_pconnect() from within
one page, as suspected the number of mysql threads
increases, but only the last connection made is being reused
by subsequent calls to mysql_pconnect from other pages/requests.
This is a bit unconfirmed, since I don't have the time and
resources right now, but tests on a production site (which
has crashed very often the last time) showed that the
following code cut down the number of mysql threads at least
tenfold:
if (!@mysql_select_db ("test")) {
mysql_pconnect("db","user","pass") or die ("No
DB:".mysql_error());
mysql_select_db ("test") or die ("database does not exist:
".mysql_error());
}
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10841&edit=2