I found the script here
which is posted in my MySQL website. The funny thing is all the post I read at the time explained that the SQL server won’t release the thread causing the server to only get more bogged down. I know in our case it certainly helped (and tales less then 1 sec to run?)
I guess now I am confused why MySQL would allow such a short term fix to be posted on their site, I am also wondering why it worked in our case?
I will admit that I modified our my.cnf file and we have not had this issue, but at the time, when we did see may sleeping processes, the simple little procedure helped!
I know the main thing I did was to limit the amount of time a process is allowed to sleep, that seems to have solved our problem. But if the sleeping processes have nothing to do with performance, what was that that I did to fix it?