-
November 15th, 2006, 06:02 PM
#1
Junior Member
MySQL Probelm
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, 06:09 PM
#2
Originally Posted by HackerSlayer
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.
http://dev.mysql.com/doc/refman/5.0/...nnections.html
Cheers:
-
November 15th, 2006, 06:14 PM
#3
Junior Member
Thanks I already tried that one still seem to be getting the same error
-
November 15th, 2006, 06:34 PM
#4
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.
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, 06:48 PM
#5
Junior Member
Ill give that a try thanks.
-
November 15th, 2006, 11:19 PM
#6
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
-
November 15th, 2006, 11:47 PM
#7
Junior Member
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
-
November 16th, 2006, 03:05 PM
#8
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
IT, e-commerce, Retail, Programme & Project Management, EPoS, Supply Chain and Logistic Services. Yorkshire. http://www.bigi.uk.com
-
November 16th, 2006, 03:27 PM
#9
Alot of times this error comes because prior connections were improperly closed.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|