At 11:17 -0700 7/26/02, Troy Hakala wrote:
>ok, i turns out I have lots of sleeping connections. This is because 
>I'm using PHP's mysql_pconnect which opens persistent connections so 
>the next connect (on the same process) will reuse the connection. 
>this does appear to improve performance overall, which is good. but 
>it seems to leave lots of sleeping processes on the SQL server.
>
>so my question is this: do sleeping connections ever get reused by 
>MySQL? or do they just timeout eventually and waste resources while 
>they're sleeping?

Are those different questions? :-)

Yes, they get reused -- when they timeout and the server closes them, freeing
a connection slot.

Use mysql_connect() instead.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to