How MySQL process sleep connection?
Hi everybody!
My PHP Application isn't using persistent connection
Some MySQL Server variables
wait_timeout: 300
interactive_timeout: 300
max_connections: 100
Assume show processlist have 50 Sleeps thread and all TIME < 300
If there are 4 new connect from my PHP Application.
2 connection mysql_connect(user,host,pass,false); CASE 1
2 connections mysql_connect(user,host,pass,false); CASE 2
How MySQL process those connections
I think CASE 1, MySQL Server will select connection in sleep connections and then assign that connection for client request
CASE 2, MySQL Server will create new thread and assign that connection for client request
Consider CASE 1. If I think correct, how MySQL select sleep connection in many sleep connect. And if I don't think corrent, how MySQL process CASE 1
Sorry for my bad English skill :d Thank you very much
|