MySQL too many connections on virtual host

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • globalinsites
    Senior Member
    • Oct 2002
    • 347

    MySQL too many connections on virtual host

    Hello,

    I get an average of 300 MySQL too many connection error e-mails a day.

    I read this in one of the posts in this forum:

    Too many connections
    read
    http://www.mysql.com/doc/T/o/Too_many_connections.html

    if you have your own dedicated servers you can increase the max_connections limit via settings you place or alter in a /etc/my.cnf file on your server. If you don't have a dedicated server but shared virtual hosting, you need to contact your web host and ask them to increase their max_connection limit if at all possible.

    Also try changing $pconnect to 0 in your config.php


    I'm on a virtual host and my host says they cannot increase their max_connection limit. I've looked for a $pconnect in my config.php but I cannot find it.

    What can I do?

    Best regards,

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

    #2
    If this is not in your config.php file, then add it:

    PHP Code:
    // use persistant connections to the database
    // 0 = don't use
    // 1 = use
    $usepconnect 0
    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

    • globalinsites
      Senior Member
      • Oct 2002
      • 347

      #3
      Originally posted by Steve Machol
      If this is not in your config.php file, then add it:

      PHP Code:
      // use persistant connections to the database 
      // 0 = don't use 
      // 1 = use 
      $usepconnect 0
      Do I also need to add PHP and the lines?? And where exactly do I need to add it? Or doesn't that matter?

      What does this code do?

      Regards, Rik.

      Comment

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

        #4
        No, just the code itself. This is included in config.php by default so if it's not there then someone manually removed it.

        As pointed out earlier, this turns persistant connections off.
        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

        • globalinsites
          Senior Member
          • Oct 2002
          • 347

          #5
          Would it be allright like this? I'm not sure where to put it yet. And it's possible that someone has removed the code manually, but why would someone do that? For any specific reason?

          Rik.


          <?php
          global $nukedir,$bbdir,$homeurl;
          ######################################################################
          # General Site Configuration
          #
          # $sitename: Your Site Name
          # $site_logo: Logo for Printer Friendly Page (It's good to have a Black/White graphic)
          # $slogan: Your site's slogan
          # $startdate: Start Date to display in Statistic Page
          ######################################################################

          # use persistant connections to the database # 0 = don't use
          # 1 = use
          $usepconnect = 0;

          $sitename = etc.....


          Comment

          • globalinsites
            Senior Member
            • Oct 2002
            • 347

            #6
            Somehow there was a return missing in the code I just posted. This is what I meant:

            <?php
            global $nukedir,$bbdir,$homeurl;
            ######################################################################
            # General Site Configuration
            #
            # $sitename: Your Site Name
            # $site_logo: Logo for Printer Friendly Page (It's good to have a Black/White graphic)
            # $slogan: Your site's slogan
            # $startdate: Start Date to display in Statistic Page
            ######################################################################

            # use persistant connections to the database
            # 0 = don't use
            # 1 = use
            $usepconnect = 0;

            $sitename = etc.....

            Comment

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

              #7
              That's not the vBulletin config.php file. You need to edit the one in your admin directory. And it should be exactly as I posted it:

              // use persistant connections to the database
              // 0 = don't use
              // 1 = use
              $usepconnect = 0;
              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

              • globalinsites
                Senior Member
                • Oct 2002
                • 347

                #8
                Originally posted by Steve Machol
                That's not the vBulletin config.php file. You need to edit the one in your admin directory. And it should be exactly as I posted it:

                // use persistant connections to the database
                // 0 = don't use
                // 1 = use
                $usepconnect = 0;
                That explains it, lol. Sorry, was looking in the wrong directory. The $usepconnect was allready set to 0 so it seems so not much to change there.

                Regards, Rik.

                Comment

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