ID:               26117
 User updated by:  spam at vrana dot cz
 Reported By:      spam at vrana dot cz
-Status:           Bogus
+Status:           Open
 Bug Type:         MySQL related
 Operating System: Linux
 PHP Version:      4.3.3
 New Comment:

Can you please read my bug report carefuly before stating bug as bogus?
Persistent connection in PHP should reuse previous persistent
connection with the same host, user and password. The bug is that it
doesn't.


Previous Comments:
------------------------------------------------------------------------

[2003-11-17 18:21:48] [EMAIL PROTECTED]

And this is PHP bug in where..?


------------------------------------------------------------------------

[2003-11-05 12:20:11] spam at vrana dot cz

Yes. There were 466 processes with the same user, host and db. All
processes were in state Sleep.

------------------------------------------------------------------------

[2003-11-05 11:21:33] [EMAIL PROTECTED]

When the "too many connections" problem occurs, have you tried running
"show full processlist;" query to see if infact all connections use the
same database?

------------------------------------------------------------------------

[2003-11-05 03:24:59] spam at vrana dot cz

This is not the case. Believe me that I have read all similar bugs and
this is different. I also have read carefuly the manual and I
understand everything written there about persistent connections.

There is written in the Persistent Database Connections chapter of
manual: An 'identical' connection is a connection that was opened to
the same host, with the same username and the same password (where
applicable). So it's not true that by mysql_select_db() with different
database name the connection can't be reused. Anyway I use the same
database in all scripts.

I know that connection is persistent only over the child. Thus I wrote
that Apache configuration directive MaxClients is set to 150.

------------------------------------------------------------------------

[2003-11-04 13:53:56] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

If you go mysql_select_db() then the persistent connection you've
created becomes specific to that particular database. Which may explain
why those connections are not re-used.
Also, persistent connections are per-child, meaning that if 1 Apache
child opens connections only that child has a pre-existing connection
avaliable. If a subsequent request is handled by another child, which
does not yet have a MySQL connection, it'll create a new connection.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/26117

-- 
Edit this bug report at http://bugs.php.net/?id=26117&edit=1

Reply via email to