+ Reply to Thread
Results 1 to 15 of 15

Thread: MySQL Errors, help please

  1. #1
    New Member Gastongr is on a distinguished road
    Join Date
    Aug 2004
    Location
    Argentina
    Age
    22
    Posts
    27

    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. #2
    New Member Gastongr is on a distinguished road
    Join Date
    Aug 2004
    Location
    Argentina
    Age
    22
    Posts
    27
    Now i get why everything is in line 271, the connection there :P
    do
    {
    $link = $this->functions[$usepconnect ? 'pconnect' : 'connect']("$servername:$port", $username, $password);
    }

  3. #3
    Customer Support Manager Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol's Avatar
    Join Date
    Jul 2000
    Location
    Jelsoft InterGalactic HQ
    Posts
    142,698
    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, vBulletin Customer Support Manager
    "Have Copy, Will Paste" (when appropriate)

    Please do not email or PM me for vBulletin support. I will be more than glad to answer your questions on the vB Forums and in the support system.

    Just remember that what happens in localhost, stays in localhost.


  4. #4
    New Member Gastongr is on a distinguished road
    Join Date
    Aug 2004
    Location
    Argentina
    Age
    22
    Posts
    27
    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 .

  5. #5
    Customer Support Manager Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol's Avatar
    Join Date
    Jul 2000
    Location
    Jelsoft InterGalactic HQ
    Posts
    142,698
    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, vBulletin Customer Support Manager
    "Have Copy, Will Paste" (when appropriate)

    Please do not email or PM me for vBulletin support. I will be more than glad to answer your questions on the vB Forums and in the support system.

    Just remember that what happens in localhost, stays in localhost.


  6. #6
    New Member Gastongr is on a distinguished road
    Join Date
    Aug 2004
    Location
    Argentina
    Age
    22
    Posts
    27
    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.

  7. #7
    Customer Support Manager Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol's Avatar
    Join Date
    Jul 2000
    Location
    Jelsoft InterGalactic HQ
    Posts
    142,698
    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, vBulletin Customer Support Manager
    "Have Copy, Will Paste" (when appropriate)

    Please do not email or PM me for vBulletin support. I will be more than glad to answer your questions on the vB Forums and in the support system.

    Just remember that what happens in localhost, stays in localhost.


  8. #8
    New Member Gastongr is on a distinguished road
    Join Date
    Aug 2004
    Location
    Argentina
    Age
    22
    Posts
    27
    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

  9. #9
    Customer Support Manager Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol's Avatar
    Join Date
    Jul 2000
    Location
    Jelsoft InterGalactic HQ
    Posts
    142,698
    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, vBulletin Customer Support Manager
    "Have Copy, Will Paste" (when appropriate)

    Please do not email or PM me for vBulletin support. I will be more than glad to answer your questions on the vB Forums and in the support system.

    Just remember that what happens in localhost, stays in localhost.


  10. #10
    New Member Gastongr is on a distinguished road
    Join Date
    Aug 2004
    Location
    Argentina
    Age
    22
    Posts
    27
    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?

  11. #11
    Customer Support Manager Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol's Avatar
    Join Date
    Jul 2000
    Location
    Jelsoft InterGalactic HQ
    Posts
    142,698
    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, vBulletin Customer Support Manager
    "Have Copy, Will Paste" (when appropriate)

    Please do not email or PM me for vBulletin support. I will be more than glad to answer your questions on the vB Forums and in the support system.

    Just remember that what happens in localhost, stays in localhost.


  12. #12
    New Member Gastongr is on a distinguished road
    Join Date
    Aug 2004
    Location
    Argentina
    Age
    22
    Posts
    27
    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.

  13. #13
    Senior Member Lionel has disabled reputation
    Join Date
    Apr 2001
    Location
    Miami
    Posts
    476
    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 at 7:19pm.

  14. #14
    Senior Member Lionel has disabled reputation
    Join Date
    Apr 2001
    Location
    Miami
    Posts
    476
    any help please? Everything was perfect before upgrading to 3.60

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

  15. #15
    Customer Support Manager Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol is a name known to all Steve Machol's Avatar
    Join Date
    Jul 2000
    Location
    Jelsoft InterGalactic HQ
    Posts
    142,698
    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, vBulletin Customer Support Manager
    "Have Copy, Will Paste" (when appropriate)

    Please do not email or PM me for vBulletin support. I will be more than glad to answer your questions on the vB Forums and in the support system.

    Just remember that what happens in localhost, stays in localhost.


+ Reply to Thread

Similar Threads

  1. Snitz MySQL to VB MySQL Impex Import Errors
    By vjcapron in forum vBulletin Impex Import System
    Replies: 3
    Last Post: Thu 5th Jan '06, 6:28pm
  2. errors here, errors everywhere (mysql)
    By Keyser Söze in forum vBulletin 3.5 'How Do I' Questions and Troubleshooting
    Replies: 5
    Last Post: Tue 4th Oct '05, 1:53am
  3. mysql errors
    By Eddie Arlette in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 4
    Last Post: Sat 31st Jan '04, 6:23pm
  4. '/var/lib/mysql/mysql.sock' [errors]
    By Koss in forum vBulletin 2 'How Do I' and Troubleshooting
    Replies: 6
    Last Post: Thu 18th Jul '02, 9:26am

Bookmarks

Posting Permissions

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts