Author Topic: Get rid of DBConnectError [Workaround]  (Read 2654 times)

mobang

  • Freshman
  • *
  • Posts: 11
    • View Profile
    • Email
Get rid of DBConnectError [Workaround]
« on: April 29, 2009, 04:04:08 am »
Hi,

just had the problem that I get this annoying DBConnectError every now and then. I use MySQL 5.1.30 with PHP 5.2.8 on Apache 2.2.11 all coming from XAMPP 1.7.0 and running on Windows XP 64Bit.

I have tracked down the problem to the connections OpenGoo leaves in sleep state on the MySQL Server. MySQL was configured to allow an unlimited number of connections and was using the default timeouts. That led to a 100% usage of MySQL and the error attached below because of several hundred connections (around 350) opened in sleep state!

Configuring the Server to accept not more than 25 connections and lower timeouts around 60 seconds solved the problem for now, just using it as a single user for the moment.

Maybe it's possible to let OpenGoo do it and use existing connections or closing them properly. Maybe this is a problem only existing on my machine?

Ralf

_____________________________
Here is the debug output of OpenGoo

Error (DBConnectError)
Failed to connect to database
Error params:
File:    D:\htdocs\opengoo\environment\library\database\adapters\MysqlDBAdapter.class.php
Line:    32
Backtrace:
#0 D:\htdocs\opengoo\environment\library\database\adapters\AbstractDBAdapter.class.php(40): MysqlDBAdapter->connect(Array)
#1 D:\htdocs\opengoo\environment\library\database\DB.class.php(97): AbstractDBAdapter->__construct(Array)
#2 D:\htdocs\opengoo\environment\library\database\DB.class.php(64): DB::connectAdapter('mysql', Array)
#3 D:\htdocs\opengoo\init.php(114): DB::connect('mysql', Array)
#4 D:\htdocs\opengoo\index.php(9): require('D:\htdocs\openg...')
#5 {main}


alearr

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Get rid of DBConnectError [Workaround]
« Reply #1 on: June 17, 2009, 01:03:25 pm »
file /config/config.php
change:
define('DB_PERSIST', true);
with:
define('DB_PERSIST', false);

Cheers,
Alearr

mobang

  • Freshman
  • *
  • Posts: 11
    • View Profile
    • Email
Re: Get rid of DBConnectError [Workaround]
« Reply #2 on: June 18, 2009, 04:15:34 am »
Thanks for this information!

I haven't seen it in the config file, must be something like selective blindness ;-)

Ralf