Announcement

Collapse
No announcement yet.

MySQL Errors, help please

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MySQL Errors, help please

    Hello,
    i have a forum that seems to work well, there are no errors when i'm on it. But at night i get emails about mysql errors like these.

    Database error in vBulletin :

    mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    /home/gaston/public_html/includes/class_core.php on line 271

    MySQL Error :
    Error Number :
    Date : Saturday, August 26th 2006 @ 05:53:55 AM
    Script : http://www.webmastershelp.com/archiv....php?t-23.html
    Referrer : http://www.webmastershelp.com/archiv....php?f-17.html
    IP Address : 70.42.51.10
    Username :
    Classname : vb_database
    Database error in vBulletin :

    mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    /home/gaston/public_html/includes/class_core.php on line 271

    MySQL Error :
    Error Number :
    Date : Saturday, August 26th 2006 @ 05:53:24 AM
    Script : http://www.webmastershelp.com/showthread.php?p=1630
    Referrer :
    IP Address : 72.30.61.81
    Username :
    Classname : vb_database
    Both seem to be the same (line 271 of class_core.php) but in different scripts.

    Then this one saying there are too many connections
    Database error in vBulletin :

    mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Too many connections
    /home/gaston/public_html/includes/class_core.php on line 271

    MySQL Error :
    Error Number :
    Date : Saturday, August 26th 2006 @ 05:51:54 AM
    Script : http://www.webmastershelp.com/archiv...x.php?t-9.html
    Referrer : http://www.webmastershelp.com/archiv....php?f-17.html
    IP Address : 70.42.51.10
    Username :
    Classname : vb_database
    I have a few ad-ons installed but no file modifications.
    Using vB 3.6.0
    Help appreciated

  • #2
    Now i get why everything is in line 271, the connection there :P
    do
    {
    $link = $this->functions[$usepconnect ? 'pconnect' : 'connect']("$servername:$port", $username, $password);
    }

    Comment


    • #3
      1. mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

      Please see this page for the causes of this error:

      http://www.vbulletin.com/docs/html/cantconnect

      2. mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Too many connections

      The server has maxed out the number of MySQL connections it allows. You can try turning persistent
      connections off in your config.php:

      PHP Code:
              //      ****** MASTER DATABASE PERSISTENT CONNECTIONS ******
              //      This option allows you to turn persistent connections to MySQL on or off.
              //      The difference in performance is negligible for all but the largest boards.
              //      If you are unsure what this should be, leave it off. (0 = off; 1 = on)
      $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.
      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


      • #4
        From the pointed document (http://www.vbulletin.com/docs/html/cantconnect)
        Can't connect to local MySQL server through socket
        If you are getting this error, it means either:

        1. The info in your config.php file is wrong (in which case your forums wouldn't work at all), or

        2. MySQL crashed, it's not running or it can't find the socket. You need to contact your host about this. Here is more info on this error:
        So problem here is in my host too, because the board works most of the time.

        The server has maxed out the number of MySQL connections it allows. You can try turning persistent
        connections off in your config.php:
        Thanks so much for the info.
        What is a good max number of connections?.
        I think my host allows 20 now, which is really crappy even for my low traffic forum.

        EDIT: Persistent connections are already off in my config.php si i will need to contact my host .

        Comment


        • #5
          The connections issue is server-wide - not just for your forums. Frankly 20 connections, even on a user basis, is far too miserly.
          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


          • #6
            I checked the diagnostics section in the vB admincp and it says the following
            max_connections: 500
            max_user_connections: 8
            Which is the one that matters?
            Thanks for your time.

            Comment


            • #7
              Both. The above error is for the server. The server exceeded 500 connections. However I would be very concerned about the 8 connections limit for your user. I have never heard of a server having this low of a limit.

              You will eventually need to find a better host.
              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


              • #8
                I'll contact them a ask to please increase it, how many max user connections should i be looking for?.
                Thanks again for your help

                Comment


                • #9
                  That depends on how busy their server is and how busy your forums are. Frankly I would advise getting away from any host that limits you to 8 MySQL connections. That is simply not a good sign.
                  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


                  • #10
                    They restrict many things, for example i can not use the ping command, nor traceroute etc.
                    I'm with resellerzoom.com
                    Can you recommend a good alternative?

                    Comment


                    • #11
                      I suggest you view the vBulletin Hosting Options forum for advice from our customers:

                      http://www.vbulletin.com/forum/forum...?s=&forumid=11

                      Also checkout this site:

                      http://www.webhostingtalk.com/
                      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


                      • #12
                        I suggest you view the vBulletin Hosting Options forum for advice from our customers:

                        http://www.vbulletin.com/forum/forum...?s=&forumid=11

                        Also checkout this site:

                        http://www.webhostingtalk.com/
                        Thanks for all your help.

                        Comment


                        • #13
                          I have the very exact problem since I went 3.60 last night. In diagnostics it says

                          max_user_connections0
                          max_connections800


                          But how can I even operate with 0 connections? Right now there are 61 users online?

                          This problem is bringing entire shared server down.
                          Last edited by Lionel; Mon 28th Aug '06, 2:19pm.

                          Comment


                          • #14
                            any help please? Everything was perfect before upgrading to 3.60

                            Now entire server is down again and am about to be homeless

                            Comment


                            • #15
                              Have you tried increasing the max_user_connections and restarting Apache?

                              If you need further help please start your own thread rather than hijacking someone else's.
                              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

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