Sleeping Processes Timeout?

2005-07-28 Thread Jason Williard
Hello,

Today, I started experiencing some issues on our website with max
connections exceeded errors.  In looking into this, I found that we had too
many sleeping processes.  I was not even able to login to the mysql server
from a command line.  Is there a way to set a timeout for sleeping
processes? 

This is a small example of what I am seeing when I run a 'show processlist'
query:

+--+--+---+---+-+--+---+
--+
| Id   | User | Host  | db| Command | Time | State | Info
|
+--+--+---+---+-+--+---+
--+
|  584 | root | localhost | blogs | Sleep   |  915 |   | NULL
|
|  595 | root | localhost | blogs | Sleep   |  900 |   | NULL
|
+--+--+---+---+-+--+---+
--+


---
Thank You
Jason Williard



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Sleeping Processes Timeout?

2005-07-28 Thread Devananda

Jason Williard wrote:

Hello,

Today, I started experiencing some issues on our website with max
connections exceeded errors.  In looking into this, I found that we had too
many sleeping processes.  I was not even able to login to the mysql server
from a command line.  Is there a way to set a timeout for sleeping
processes? 


This is a small example of what I am seeing when I run a 'show processlist'
query:

+--+--+---+---+-+--+---+
--+
| Id   | User | Host  | db| Command | Time | State | Info
|
+--+--+---+---+-+--+---+
--+
|  584 | root | localhost | blogs | Sleep   |  915 |   | NULL
|
|  595 | root | localhost | blogs | Sleep   |  900 |   | NULL
|
+--+--+---+---+-+--+---+
--+


---
Thank You
Jason Williard





Jason,

Your web application is probably using persistent connections when it 
does not need them. The best thing to do, if that's the case, would be 
replace all the mysql_pconnect calls in your application with 
mysql_connect (or what ever the language-specific function name is). 
You could also set the wait_timeout value in your my.cnf to something 
shorter, but this would affect all your applications and does not 
address the source of your problem.


Regards,
Devananda vdv

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Sleeping Processes Timeout?

2005-07-28 Thread Juan Pedro Reyes Molina
I had a similar problem while connecting to mysql 4.0.21 throuhg MyODBC 
3.51.11.


If so you must upgrade mysql to 4.1 or downgrade MyOdbc to 3.51.06


Jason Williard wrote:


Hello,

Today, I started experiencing some issues on our website with max
connections exceeded errors.  In looking into this, I found that we had too
many sleeping processes.  I was not even able to login to the mysql server
from a command line.  Is there a way to set a timeout for sleeping
processes? 


This is a small example of what I am seeing when I run a 'show processlist'
query:

+--+--+---+---+-+--+---+
--+
| Id   | User | Host  | db| Command | Time | State | Info
|
+--+--+---+---+-+--+---+
--+
|  584 | root | localhost | blogs | Sleep   |  915 |   | NULL
|
|  595 | root | localhost | blogs | Sleep   |  900 |   | NULL
|
+--+--+---+---+-+--+---+
--+


---
Thank You
Jason Williard



 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]