tags:

views:

93

answers:

1

I am getting "too many connections" problem in an Asp .Net Mvc application which get fix when i manually kill process through Mysql v6.56 IDE, But on remote hosting computer where i can't kill process each time how can i fix this error.

I have tried making a connection to information_schema DB's PROCESSLIST table but when connection is about to execute command there comes an error "access denied of root@loclahost information_schema". I also have tried to grant all privileges to root@loclahost but still i am not able to fix this problem. I have been coding the same way from last two years but in this application i am getting this problem i have use close each connection in every method. Please if some one have ever got this problem or know the answer.Please help me. Thanx in advance

+1  A: 

You need to close the connections from within your code, by calling close() on your connection Objects. Killing the threads through MySQL server is a horrible idea

Midhat
i have use this method everywhere i had already written.
deepesh khatri
then you need to fix it.
Midhat
because you may not always have access to mysql server, or the privileges to kill threads
Midhat