Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Fatal Error in Gdn_Database.Connection();

edited October 2011 in Vanilla 2.0 - 2.8
In the last day I've been seeing this error a lot. It generally happens right after logging in with facebook connect or Google. I'm pretty certain something during the login process is causing MySql to crash.

I googled the phrase "Fatal Error in Gdn_Database.Connection(); " and the majority of the results point to websites running vanilla forums.

Anyone knw whats going n?

Answers

  • Put this in config/config.php to get a full error message

    $Configuration['Garden']['Errors']['MasterView'] = 'deverror.master.php';
  • I do have the full error already. It seems like vanilla crashes MySql. After waiting about 10 minutes the connection is restored.

    An error occurred while attempting to connect to the database
    SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'localhost' (10060)

    56: $this->_Connection = new PDO(strtolower($this->Engine) . ':' . $this->Dsn, $this->User, $this->Password, $this->ConnectionOptions);
    57: if($this->ConnectionOptions[1002])
    58: $this->Query($this->ConnectionOptions[1002]);
    59: } catch (Exception $ex) {
    60: trigger_error(ErrorMessage('An error occurred while attempting to connect to the database', $this->ClassName, 'Connection', $ex->getMessage()), E_USER_ERROR);
    61: }
    62: }
    63:
    64: return $this->_Connection;

  • I've narrowed it down to vanilla forum crashing mySql. As soon as the forum is loaded mysql goes down.
  • Have you tried repairing/optimising your database tables?
  • Which table and where should I start?
  • camocamo New
    edited October 2011
    id do all. check all with selected='repair' then check all with selected='optimise'

    are you using PhpMyadmin or similar? you should probly back it up first.

    heres a guide with screenshots if you need help, its very easy

    http://paulstamatiou.com/how-to-quickie-repair-mysql-tables-in-phpmyadmin

    this ones pretty straight forward too

    http://www.devshed.com/c/a/MySQL/Backing-up-and-restoring-your-MySQL-Database/4/
Sign In or Register to comment.