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
Are those different questions? :-)
Yes, they get reused -- when they timeout and the server closes them, freeing
a connection slot.
Use mysql_connect() instead.