Hmmm. I thought the article answered the question 'why do I have so many Threads_created?' perfectly - and how to fix it (if indeed, it needs fixing), because Threads_created has nothing to do with cake hanging on to connections (or not).
Threads_created is the number of times mysql has had to create a new connection/thread since the server was started - if your Uptime is high, this can be a very large number. It is *not* the number of currently active threads. Restart mysql and it'll drop to single figures (as will Uptime). You only have 5 connections cached, 3 of which are idle (connected) and two are in use (running). If you are concerned about the Threads_created then the above article will demonstrate how to 'fix' it. I cannot see anything that suggests there is an issue with cake (or php, or mysql) hanging on to connections. Now if you had 'Threads_running 1098' on a small site... ~GreyCells @Chris It appears connections are not always closed at end of script: http://uk2.php.net/mysql_connect (top comment) :) but cake seems to behave impecably. On May 2, 1:56 pm, redhex <[EMAIL PROTECTED]> wrote: > GaryCells: > My questions was not to know about what those number means or to know > more about mysql status. This is a cakephp forum and hence I am asking > does cakephp closes connections when the script dies. > > So any other takers? > Question again: > > Does cakephp close all connection when the script finish running? > Current I am using mysql_connect. > > Post your <a href="http://www.ablewise.com/">Free Classifieds</a> at > Ablewise.com > > On May 2, 4:09 pm, GreyCells <[EMAIL PROTECTED]> wrote: > > > Google is your friend: > > >http://www.google.co.uk/search?q=mysql+threads_created > > > First hit: > > >http://jeremy.zawodny.com/blog/archives/000173.html > > > ...might help. > > > ~GreyCells > > > On May 2, 7:21 am, redhex <[EMAIL PROTECTED]> wrote: > > > > Hi all, > > > I am doing monitoring for my site which is cake based and found the > > > following: > > > > mysql "show global status" > > > > [158] Threads_cached 5 > > > [159] Threads_connected 3 > > > [160] Threads_created 1098 > > > [161] Threads_running 2 > > > > I am concern with the threads_created count. I guess it is a little on > > > the high side. > > > I am requesting my host to increase the thread_cache_size value at the > > > meantime from 8 to 32. > > > > My question here is this: > > > Does cakephp close all connection when the script finish running? > > > Current I am using mysql_connect. > > > > My mysql queries are done via the model interface. i.e. $this- > > > > >modelname->query( ); > > > > All input and comments are welcomed. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
