Edit report at https://bugs.php.net/bug.php?id=28098&edit=1

 ID:                 28098
 Comment by:         jose dot nobile at gmail dot com
 Reported by:        moreau at myrealbox dot com
 Summary:            mysql_pconnect never kills threads
 Status:             Bogus
 Type:               Bug
 Package:            MySQL related
 Operating System:   FreeBSD 5.2.1
 PHP Version:        4.3.6
 Block user comment: N
 Private report:     N

 New Comment:

I don't found any form to use persistent connections.

No threads, no working
threads, no working
php in console, no working


What is the enviroment to use persistent connections?

Apache + forker
Apache + Worker
Apache + PHP fastcgi

Which???

This is not a bogus, is a real BUG of 7 years old.


Previous Comments:
------------------------------------------------------------------------
[2004-04-22 18:26:16] il...@php.net

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

When using threads you should not be using persistent 
connections, because PHP cannot identify existing 
connections as already avaliable and therefor opens a new 
persistent connection each time. 

------------------------------------------------------------------------
[2004-04-22 08:36:07] moreau at myrealbox dot com

Thanks for your answer too, I didn't know that persistent connection is not 
closed after ending script.
But I don't agree that such behaviour as I describe is normal. As I mentioned 
pconnect generate new thread in each new running script.
BUT THIS IS THE SAME SCRIPT! So as said in documentation 
pconnect should REUSE old connection , BUT DON'T generate
new connection. In practice - pconnet don't close any connection at all, but 
don't reuse previous connection and
generate new.
Is this also correct behaviour ?

------------------------------------------------------------------------
[2004-04-22 01:54:05] il...@php.net

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

Persistent connections remain active until the Apache is 
shutdown. This is expected behavior. 

------------------------------------------------------------------------
[2004-04-21 22:02:35] moreau at myrealbox dot com

Yes, significantly.
Each script is successfully ended , so apache returns in 
normal state ( minimal threads and process - as pointed in config ) after long 
timeout ( when pages aren't requested ). But MySQL has many threads and no one 
of threads never die.

------------------------------------------------------------------------
[2004-04-21 19:19:51] gschlossna...@php.net

mysql extension will create one connection per database 
connect string per PHP interpreter context, i.e. one per 
Apache thread or child.  Is the number of connections 
you are seeing exceeding your Apache thread count?


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


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

    https://bugs.php.net/bug.php?id=28098


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

Reply via email to