How to change Dolphin's Persistent Mysql Database Connect to Non-Persistent Standard Connect.
Some shared hosting providers may complain or even suspend your account for using too many resources associated with mysql connections. If your hosting provider asks you to look into too many mysql connections, they tell you that you have mysql connections not closing or sleeping you might consider adjusting your Dolphin site.
You might simply try changing Dolphins default persistent database connection to standard / non-persistent connect.
See this great explanation article for more information regarding persistent compared to standard / non-persistent mysql connections.
Persistent database connections
For Dolphin 6.1x (for Dolphin 7x see further down page)
To change this, you will need to make one minor change to:
Since this is fairly simple and there is no change to your database itself, it's really not a big deal or problem to just try it for a few days and see if it helps.
This if very simple, but you should consider backing up the original file before making changes.
After you have backed up the file /inc/db.inc.php open it with your favorite text editor and find near the top portion of the file:
$this->link = @mysql_pconnect( $this->host . $this->port . $this->sock, $this->user, $this->passwd );
Then simply change to:
$this->link = @mysql_connect( $this->host . $this->port . $this->sock, $this->user, $this->passwd );
You are just changing pconnect to connect.
Then save the changes and/or re-upload over writing the original.
If your host was complaining to you, after making the changes you might tell them you changed your script from persistent connections to standard / non-persistent connections. If they could kindly restart mysql you are hoping that this will do away with the mysql resource issue they speak of.
This is a very fast and simple change, and worth a try if your host is warning you about mysql resources. If they are not then don't mess with it.
For Dolphin 7x similar code, but you will find it in the following file instead:
$this->link = @mysql_pconnect($full_host, $this->user, $this->password) or $this->error('Cannot connect to database');
$this->link = @mysql_connect($full_host, $this->user, $this->password) or $this->error('Cannot connect to database');
Pretty much the same as with Dolphin 6.1x, you are changing pconnect to connect just in a different file location.