Forum, MySQL Connect Error

Warning: mysql_error() expects parameter 1 to be resource, boolean given in /www/dolphin/modules/boonex/forum/classes/en/BxDb.php on line 210 Could not connect to MySQL database.

Is this something I did, or is this a 7.1 bug?

Geeks, making the world a better place
Quote · 30 Nov 2012

 

Could not connect to MySQL database.

 Based on that, more likely database server over loaded. Did you have them crank down the number of allowed connections?


https://www.deanbassett.com
Quote · 30 Nov 2012

OK, working on it now, thanks

Geeks, making the world a better place
Quote · 30 Nov 2012

Is that a yes? You had them crank it down so now your having them turn it back up?

I hope you did not misunderstand what i said.

https://www.deanbassett.com
Quote · 30 Nov 2012

We currently have it set to 50 and the database server is staying up at that level.

Geeks, making the world a better place
Quote · 30 Nov 2012

What we are trying to determine is if Dolphin is just that resource intensive or if there are processes running that shouldn't be running.  For example, could the forum be at play?

We are on 1 CPU, 2 Gigs of Ram VPS with a 3TB data traffic.

Geeks, making the world a better place
Quote · 30 Nov 2012

Key buffer size     Default
Sort buffer size     Default
Network buffer size     Default
MyISAM sort buffer size     Default
Tables to cache     Default
Query cache size in bytes     Default
Maximum packet size     Default
Maximum number of connections 50
Query cache size in bytes 16 MB
Maximum packet size 16 MB

I don't know what the default values are at this time.  I can not connect to the Trax server/hosting recommendations link.

Geeks, making the world a better place
Quote · 30 Nov 2012

there are currently a total of 4 active users on on our site - and 50 database connections. We are trying to figure out if we have something wrong.

Notice that the number of connections match our Maximum number of connections.

Geeks, making the world a better place
Quote · 30 Nov 2012

There are many hits during every page load by each user. Yes. Dolphin is very database intensive. I have never actually tried to determine how hard it hits the database, but i know it is high.



https://www.deanbassett.com
Quote · 30 Nov 2012

So basically with a 1 CPU, 2 Gig VPS, we just don't have enough power. 

Geeks, making the world a better place
Quote · 30 Nov 2012

 

there are currently a total of 4 active users on on our site - and 50 database connections. We are trying to figure out if we have something wrong.

Notice that the number of connections match our Maximum number of connections.

 HINT!...
You can find this error if your scripts open persistent connections, which aren't closed even if the script terminates. Use mysql_connect() instead of mysql_pconnect()


Apache does not work well with persistent connections. When it receives a request from a new client, instead of using one of the available children which already has a persistent connection open, it tends to spawn a new child, which must then open a new database connection. This causes excess processes which are just sleeping, wasting resources, and causing errors when you reach your maximum connections, plus it defeats any benefit of persistent connections

http://www.boonex.com/forums/?action=goto&search=1#topic/Mysql-connections-are-being-left-open-Any-advice-why.htm

Quote · 30 Nov 2012

Thank you.  Yes, I saw about the persistence connections and changed the setting in php.ini as well as changing it in BxDolDb.php.  I cleared caches and then stopped and restarted the MySQL server.  I am still running up against DB connect errors; although the MySQL server is not shutting down on me, and the site is rather slower than when it was just the developers on it.

Geeks, making the world a better place
Quote · 30 Nov 2012

Uh, php is running as an Apache mod, do I need to stop/start Apache for the new php.ini file to take affect?  I am new to the world of running a VPS.

Geeks, making the world a better place
Quote · 30 Nov 2012

 

Uh, php is running as an Apache mod, do I need to stop/start Apache for the new php.ini file to take affect?  I am new to the world of running a VPS.


You said you did in your previous post. But yes, i think you do.
 
then stopped and restarted the MySQL server.


https://www.deanbassett.com
Quote · 30 Nov 2012

OK, those changes may have helped the database connect error; I need to muck about the site some more to see.  I was working with membership entries earlier and got the database connect errors a few times.

There is another problem I am seeing, and that is with the Apache server.  It seems to take a long time for the server to respond to a request.  I can click on a menu item and my browser spinning circle thingy spins backwards in grey for a long time.  Once it stops and spins forward in green, the page loads very quickly.

Can anyone point me to a section on configuring the web server?  Dolphin's trax page on this seems to be broken.

Geeks, making the world a better place
Quote · 30 Nov 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.