MySQL Probelm
Results 1 to 9 of 9

Thread: MySQL Probelm

  1. #1
    Junior Member
    Join Date
    Oct 2006
    Posts
    10

    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.

  2. #2
    I'd rather be fishing DjM's Avatar
    Join Date
    Aug 2001
    Location
    The Great White North
    Posts
    1,867
    Quote 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:
    DjM

  3. #3
    Junior Member
    Join Date
    Oct 2006
    Posts
    10
    Thanks I already tried that one still seem to be getting the same error

  4. #4
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    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)

  5. #5
    Junior Member
    Join Date
    Oct 2006
    Posts
    10
    Ill give that a try thanks.

  6. #6
    Senior Member
    Join Date
    Jan 2002
    Posts
    1,207
    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

  7. #7
    Junior Member
    Join Date
    Oct 2006
    Posts
    10
    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

  8. #8
    rebmeM roineS enilnOitnA steve.milner's Avatar
    Join Date
    Jul 2003
    Posts
    1,018
    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

  9. #9
    Member LarrySmith's Avatar
    Join Date
    Aug 2002
    Posts
    69
    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
  •