Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 12-09-2012, 09:13 PM   #1
LQ Newbie
Registered: Jun 2012
Location: /home/ubungu
Posts: 27

Rep: Reputation: Disabled
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL process - Sleep. What does it mean? linuxfond Linux - Newbie 7 04-11-2009 08:04 PM
How to make a process sleep? bjdea1 Linux - General 1 12-11-2007 09:58 AM
MATLAB process wants to SLEEP! amwink Linux - Kernel 2 02-05-2007 08:26 PM
process in Disk sleep rahulk Linux - Software 5 06-29-2006 06:06 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:45 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration