Tutorial

One of the things that has been mentioned a number of times over the years is to remove the Dolphin persistent connection. This one goes back at least as far as Dolphin 6.1.x possibly earlier.

I do know that the current Dolphin 7.1.0 version does have something up with database queries. Whether Boonex needs to do a little more optimizing or not I couldn't tell you at this point. I just know that I have seen a definite increase in database connections, which can result in the Boonex Dolphin Red Screen of Death (Error - Database connect failed) like this:

Dolphin Database Connect Failed



After removing persistent connect, so far things seem to be running a bit smoother.

If you frequently see the Red Database connect failed error page you might consider removing the persistent connect for a few days to see if things improve. There is no guarantee that this will solve your problem. You could have other database issues going on.

To do so you need to manually edit the following file:
/inc/classes/BxDolDb.php


Open BxDolDb.php and locate the following lines of code:
function connect()
    {
        $full_host = $this->host;
        $full_host .= $this->port ? ':'.$this->port : '';
        $full_host .= $this->socket ? ':'.$this->socket : '';

        $this->link = @mysql_pconnect($full_host, $this->user, $this->password);


Simply remove the p from pconnect so it looks like:
function connect()
    {
        $full_host = $this->host;
        $full_host .= $this->port ? ':'.$this->port : '';
        $full_host .= $this->socket ? ':'.$this->socket : '';

        $this->link = @mysql_connect($full_host, $this->user, $this->password);


Save the changes back to your hosting account.

Then, test your Dolphin 7.1 website for several days to see if the Red Database connect failed error goes away or seems to happen less often.

If not simply change mysql_connect back to mysql_pconnect.

I know I didn't see this error nearly as much with Dolphin 7.0.x. Hopefully as Dolphin 7.1.x progresses Boonex will work on additional database query optimizations.


Additionally:
If you would like to hide the big Dolphin Red Database connect failed error from displaying to visitors you can do so in the same file.

Open /inc/classes/BxDolDb.php

For Dolphin 7.1.0 near the top find:
define( 'DB_FULL_VISUAL_PROCESSING', true );
define( 'DB_FULL_DEBUG_MODE', true );
define( 'DB_DO_EMAIL_ERROR_REPORT', true );

And change it to:
define( 'DB_FULL_VISUAL_PROCESSING', true );
define( 'DB_FULL_DEBUG_MODE', false );
define( 'DB_DO_EMAIL_ERROR_REPORT', true );

Then save the changes back to your host again.

It will look like this instead:
Dolphin Debug False


Or, for Dolphin 7.1.1 you could possibly change it to:
define( 'DB_FULL_VISUAL_PROCESSING', false );
define( 'DB_FULL_DEBUG_MODE', false );
define( 'DB_DO_EMAIL_ERROR_REPORT', true );

And, it will look like instead:
Dolphin Visual Processing False



Both of which reveal less information about your account and database to your visitors in the event that there would be a database connection issue. Dolphin 7.1.0 does reveal more than Dolphin 7.1.1. Boonex seems to have updated the code slightly.

 
Written By
Tutorial by: Jeremy LeSarge (AKA Ray)

I am the owner and administrator of DialMe.com. I write Tutorials for Boonex Dolphin as well as tips and resources surrounding website programming and development. I enjoy working with WordPress, SEO, and Web Hosting / Servers. I also maintain a WordPress Blog here on this site where you will find a variety of technology and webmaster resources.

Actions
Recommend
Sponsored Links