November 15th, 2006, 05:02 PM
Database exception: MySQL has too many connections. Check to make sure default server settings allow correct number of connections. Do anyone know how to fix this? Ive googled the crap out of it and can't find anything helpful.
November 15th, 2006, 05:09 PM
This might help.
Originally Posted by HackerSlayer
November 15th, 2006, 05:14 PM
Thanks I already tried that one still seem to be getting the same error
November 15th, 2006, 05:34 PM
You can change the max connections by adding to my.cnf (usually under /etc):
set-variable = max_connections=500
The default I think is 100, but there might also be other things you might have to change and somewhere in there I read the number of connections is dependent on how well your OS handles threading...regardless, look there and in the first link and try bumping the # up (and restarting mysql each time). You might could also shorten timeouts in case hung sessions are causing that # to be too high.
There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.
(Merovingian - Matrix Reloaded)
November 15th, 2006, 05:48 PM
Ill give that a try thanks.
November 15th, 2006, 10:19 PM
Rather than increasing the maximum number on the server, try reducing the number of client connections instead.
If you have one or more web servers connecting to the MySQL, try reducing the number of threads they use. If you use a database connection pool, reduce its max size, or if using Apache and PHP, reduce MaxClients.
A lot of setups use excessive numbers by default.
November 15th, 2006, 10:47 PM
Im still getting the error. Here is hat it says.
Database exception: MySQL has too many connections. Check to make sure default server settings allow correct number of connections.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Exception: Database exception: MySQL has too many connections. Check to make sure default server settings allow correct number of connections.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[Exception: Database exception: MySQL has too many connections. Check to make sure default server settings allow correct number of connections.]
GoldInspection.Engine.BaseMain..ctor() in C:\Documents and Settings\tatemononai\My Documents\Visual Studio 2005\Projects\GoldInspection\GoldInspection.Engine\BaseMain.cs:78
Interface.user_login(String userid, String password) +41
Interface.button_login_Click(Object sender, EventArgs e) +38
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +105
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +115
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
November 16th, 2006, 02:05 PM
What's you project doing?
I have a feeling it might be trying to login to MySQL, failing, and then try to do this again instantly in a loop, without closing the connection cleanly.
IT, e-commerce, Retail, Programme & Project Management, EPoS, Supply Chain and Logistic Services. Yorkshire. http://www.bigi.uk.com
November 16th, 2006, 02:27 PM
Alot of times this error comes because prior connections were improperly closed.