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.
Printable View
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.
This might help.Quote:
Originally Posted by HackerSlayer
http://dev.mysql.com/doc/refman/5.0/...nnections.html
Cheers:
Thanks I already tried that one still seem to be getting the same error
http://dev.mysql.com/doc/refman/5.0/...arameters.html
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.
Ill give that a try thanks.
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.
Slarty
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.
Source Error:
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.
Stack Trace:
[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
Hmmm.
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.
Steve
Alot of times this error comes because prior connections were improperly closed.