Database Connection Errors

I had someone setup the BBPress Forum integration with my WP blog. I have it setup as a private Forum. It was all working until mid December.

Now I get database connection errors and it lags a lot. Sometimes you click on something and it will fly through to the next page like it is supposed to work and other times it just sits there and it eventually times out and gives just a blank screen or you get that Database Connection error like this

“ERROR: Could not establish a database connection”

I am using GoDaddy with a Deluxe hosting account. I don’t have a huge amount of readers on the site but they are there most of the day. Still I believe my hosting account should be able to handle this setup.

I have contacted GoDaddy everyday for the last 2 weeks. They said that I have two separate databases, one for the blog and one for the BBPress install so there shouldn’t be any strain on the databases. They also test their server everytime I call and don’t see anything significant. I upgraded the account to get more simultaneous connections.

I also installed WP Super Cache to help and that did nothing.

I also had someone working on the problem and he can’t find anything on my side.

If everything was OK until December, what happened in December? Did you update and software or plugins? Did the host change something you don’t know about? With a hosting company, chances are they watch things like free disk space and RAM, but that’s worth checking into as well.

Can you dump the databases and see how large they are? Maybe a plugin has gone crazy and is just adding tons of data to the database causing access to take longer. There was a recent WordPress (or maybe bbPress) discussion about this, a typo in a plugin causing tons of garbage to be added to the database causing the database to grow huge.

Do you have access to logs? Depending on what you have access to, you might be able to find something interesting in a log.

Do you have the option to turn off plugins and revert to a default theme to see if the problem still exists?

There used to be a plugin called bb-benchmark that would help with this sort of performance thing.

My guess would be that this is a plugin causing a timeout when connecting to the database. What plugins are you using?

Lots of questions, little answers The original guy who set it up for me can no longer help me. He is too busy for little ole’ me. In December the only thing he did was to make it so that when someone copied and pasted text from any site into a post on the Forum it would strip out the HTML code and bring it over as pure text. He never told me how he did it. I have the original message and date he did it though.

If I could find someone who could work on this I would be happy to pay them. I paid someone and they were not BBPress experts so they couldn’t solve the problem.

I am using a WYSIWYG plug-in to allow the users to Bold, Italicize, etc. the text the put into a post. I disabled that 2 days ago when I had the problem again because the original guy said he didn’t know if it would cause problems. That didn’t solve the problem.

There could be a plugin that starts with an underscore, so it’s autoloaded. Can you look in your my-plugins directory and see if there’s a plugin with a name like _plugin-name.php – that would autoload. I’m not sure if that will affect the count like you’re seeing.

If I had to guess, I would guess it’s related to the change that was made to strip out the HTML from a post. That would rely on a regular expression (to look for things like HTML code) and could be very inefficient, causing excessive load. It’s a possibility.

Is there an autoload plugin (one that begins with an underscore) and if there is, is it the one that was created to strip out HTML?

I see that the tinymce.php file was updated on 12/10/09 and I believe that was when the problem started. But, I disabled that plug-in one yesterday and it did not change anything. That file seems to be the only one related to that plug-in that was updated.

I looked through other directories and files and don’t see anything else that was updated on 12/10/09 so far.