Another mySQL DB Connection Limit Issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • weave
    Member
    • Jul 2011
    • 62
    • 4.1.x

    [Forum] Another mySQL DB Connection Limit Issue

    So I am new to vBulletin...coming from PHPBB3.

    Right now my forum is hosted on Bluehost (both the PHPBB3 and the new vBulletin). I am currently in the install and testing phase with VB 4.1.4 and have all of 7 users testing with me......yet this AM I wake up to hundreds of these emails.

    Database error in vBulletin :

    mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: User [username] already has more than 'max_user_connections' active connections/[location]/includes/class_core.php on line 314

    MySQL Error :
    Error Number :
    Request Date : Thursday, July 7th 2011 @ 07:29:27 PM
    Error Date : Thursday, July 7th 2011 @ 07:29:27 PM
    Script : xxxxx
    Referrer : xxxx
    IP Address : x.x.x.x
    Username :
    Classname : vB_Database
    MySQL Version :

    So I get that, from asking BlueHost support, that the current limit is 20. I also get, from reading, that this is too low yet have not seen what number is ideal. From talking to them, I can pay to upgrade to 40.....not sure that does my any good.

    Where I am really struggling is that my current forum (PHPBB), on the same hosting provider, has around 200 concurrent users at a time, with the largest to date over 300 at once... Now here I am in a "test" forum with 7 whole users, and I get these emails???? I am stuck as this just does not compute at all....even if I was hit by bots.

    Most users ever online was 5, 15 Hours Ago at 01:24 AM.

    I have also made sure that I have this setting in my config.php


    $config['MasterServer']['usepconnect'] = 0;

    So someone please help me out here. Either I have an error in my configs, or 4.1.4 needs to be recoded in the way it handles DB connections..

    I have already looked at other hosting providers, and while they may get me over the SQL limit, their max GB bandwidth limit would kill me as I am always over 100GB per month and growing every month.
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    This is a server/host issue. The server has maxed out the number of MySQL connections your host allows you to have. You can try turning persistent connections off in your config.php:

    $config['MasterServer']['usepconnect'] = 0;

    But if you still have problems after that, all you can do is ask your host to raise the maximum number of connections they allow.

    Here is more info on this error:


    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment

    • weave
      Member
      • Jul 2011
      • 62
      • 4.1.x

      #3
      Originally posted by Steve Machol
      This is a server/host issue. The server has maxed out the number of MySQL connections your host allows you to have. You can try turning persistent connections off in your config.php:

      $config['MasterServer']['usepconnect'] = 0;

      But if you still have problems after that, all you can do is ask your host to raise the maximum number of connections they allow.

      Here is more info on this error:


      http://dev.mysql.com/doc/refman/5.0/...resources.html
      Ok, I get the canned response, can you go back and re-read what I said?

      1) The setting is at "0"
      2) Why does vBulletin do this when PHPBB3 clearly does not (seems to be more of a vBulletin issue to me)
      3) if is it a hosting issue, fine, what is the number of SQL connections I need to find? 500, 1000, unlimited?

      Thanks

      Comment

      • Steve Machol
        Former Customer Support Manager
        • Jul 2000
        • 154488

        #4
        1. Yes, got that. It's still a server issue.
        2. You have more MySQL connections to vB than your host allows. That is the problem.
        3. That depends on how busy your forums are and exactly what your members are doing. I would start with about twice the maximum number of users (guests and members) on your site at any given time.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment

        • weave
          Member
          • Jul 2011
          • 62
          • 4.1.x

          #5
          Hum, so right now I need a host who would give me around 750...and my forum is growing very fast.

          So no idea why, with only 7 users, this happend?

          Comment

          • Steve Machol
            Former Customer Support Manager
            • Jul 2000
            • 154488

            #6
            I have no way of knowing what your host currently limits you to.
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment

            • weave
              Member
              • Jul 2011
              • 62
              • 4.1.x

              #7
              Understood.

              So are we saying that in vBulletin, that 1 user = 1 MySQL connection? Does have the CMS add more to this? I am still not getting how you make SQL connections compared to PHPBB.

              Thanks

              Comment

              • Steve Machol
                Former Customer Support Manager
                • Jul 2000
                • 154488

                #8
                It depends on what that user is doing, but essentially 1 user = at least 1 connection used.
                Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                Change CKEditor Colors to Match Style (for 4.1.4 and above)

                Steve Machol Photography


                Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                Comment

                • weave
                  Member
                  • Jul 2011
                  • 62
                  • 4.1.x

                  #9
                  Thanks Steve

                  Comment

                  • DrMarie
                    New Member
                    • Jun 2011
                    • 6
                    • 4.1.x

                    #10
                    I think there may be a VB bug. When I first installed my forum I started to get these error messages and I only had 4 users! How can 4 users take up all of my database connections? I'm guessing there is a missed mysql close or something somewhere in the code.

                    Of course, it could be in the code in the rest of my site, but then why are so many people having this problem!

                    Comment

                    • beishe8
                      Senior Member
                      • Oct 2005
                      • 6782
                      • 4.2.X

                      #11
                      Originally posted by DrMarie
                      I think there may be a VB bug. When I first installed my forum I started to get these error messages and I only had 4 users! How can 4 users take up all of my database connections?
                      Please check "Who's Online" :
                      There are currently 969 users online. 55 members and 914 guests
                      Most users ever online was 12,419, Sun 23rd May '10 at 10:46am.
                      Maybe there are more than 4 users online.


                      vB5 is unequivocally the best forum software, but not yet...

                      Comment

                      • Zachery
                        Former vBulletin Support
                        • Jul 2002
                        • 59097

                        #12
                        There is no vBulletin bug for this specific issue.

                        Each user who connects to your site, for at least a second or two, must make at least 1 mysql connection to get the data.
                        If you are limited to 10 connections, you might never get hit with the limit with only 10 users online. All 10 connections would have to be in use when an 11th connection starts. This would generate the error. This error is a MySQL error and vBulletin has no control over it. Your webhost is limiting your mysql resources.

                        Comment

                        • Steve Machol
                          Former Customer Support Manager
                          • Jul 2000
                          • 154488

                          #13
                          This:

                          mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: User [username] already has more than 'max_user_connections' active connections/[location]/includes/class_core.php on line 314

                          ...is a server issue. It is not a vB 'bug'.

                          Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                          Change CKEditor Colors to Match Style (for 4.1.4 and above)

                          Steve Machol Photography


                          Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                          Comment

                          • lmgc
                            Member
                            • Nov 2009
                            • 61

                            #14
                            Hello

                            i have the same issue just after upgrading to v 4.1.4 PL1 !!
                            with the past release (4.1.4) i did not have any mysql errors !

                            is the probleme concerning this new PL ?

                            Comment

                            • Zachery
                              Former vBulletin Support
                              • Jul 2002
                              • 59097

                              #15
                              What is the specific error message you're getting?

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...