News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

SMF Database Error!

Started by prince_bear, February 29, 2012, 09:03:46 PM

Previous topic - Next topic

prince_bear

Hi Folks.
Forum Link: http://christianfamilyplanning.net
SMF Version: 2.0.2
Plugins:
- EzPortal    0.6.0
- httpBL    2.5.1
- Quick Moderation on Quick Reply    1.1.2
- Users Online Today    2.0.1
- Signature Option Post    1.1.1
- Last Post On MemberList    1.3
- Tapatalk SMF 2.0 RC4/RC5/Final Plugin    3.0.1
- Drafts (for SMF 2.0 / SMF 1.1)    2.0.1
- Google Analytics Code 1.4 (Removed 3/5/2012 due to addition of Cloudflare.)
- Cloud Flare 1.0
- Custom Action Mod 3.2 (Removed 3/5/2012 due to non-use)
- Register Redirect    1
- Login Security    1.0.2.2
- YouTube BBCode    2.6
- Stop Spammer    2.3.9
- NoFollow All Links    1.2.1
- Ultimate Profile    0.9.1
- InLine Attachments    1.2.1
- AjaxChat Integration    3.2.1 (modified for SMF 2 RC3)
- Display Signatures Only Once Per Page    1.0.3

Host: Anhosting
Membership: 150 people. 60-65 people are active in any given 24 period.
Bandwidth: 7-9 GB/Month

Issue: Several days ago the forum started emailing me the following error message, "There has been a problem with the database! This is a notice email to let you know that SMF could not connect to the database, contact your host if this continues." When these happen, usually the site is up by the time I get the email.

I contacted Anhosting, and they said there appeared to be nothing obviously wrong but to contact them again when it happened again, I did so twice, but they could not find anything obviously wrong. We have also been having intermittent site outages. When I check the cpanel resource usage, I am getting CPU and memory spikes to 100% sometimes together, and sometimes separately. These spikes do not seem to correlate with traffic patterns however.

The ironic part is that Anhosting has not commented on excessive CPU usage or threatened to shut us down, nor highlight any specific batch of code that is consuming the most CPU time.

Are there any specific things I can do to troubleshoot this? Any specific plugins from the list which are suspect?


Illori

looks like you have an oversold host, not much you can do to fix this but move to a non-oversold host. this error is a server issue and since you are on shared hosting there is nothing you can do to fix it.

prince_bear

Thank you Illori for the advice, and that is the direction we will have to head soon. Is there some type of SMF Documentation on this error, as to what specific server conditions cause it? Basically how do I know this is a specifically a server error and not something caused by errant plugin which I can remove, which is causing the server to bork?

Kermit

You can just try to disable all mods one by one ,which have something to do with database,then you might see,which ones cause that database error,but as stated before for the long term you will definitely need to have a better hosting service
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Illori

most of the time it is due to server configuration not the mods you have installed. and also due to the server load due to the number of websites your host puts on one system, neither of which you can control nor fix.

Kermit

Quote from: Illori on March 05, 2012, 05:34:06 AM
most of the time it is due to server configuration not the mods you have installed. and also due to the server load due to the number of websites your host puts on one system, neither of which you can control nor fix.

Sometimes the reason can be also a mod not just server settings,which has many sql queries !
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

prince_bear

Quote from: Kermit on March 05, 2012, 05:41:44 AM
Sometimes the reason can be also a mod not just server settings,which has many sql queries !

If one was to rank the Mods listed above by SQL Queries. Is there one or two that stand out, that I should consider finding replacements for?

prince_bear

Okay. Major <Head Desk>

I managed to delete the database for a test SMF forum on the site without checking which database was connected to which forum in which folder. When a random spider came by to access the forum, the forum would fail to load because there was no database to pull from and triggered the database connection email at the same time. Unfortunately due to the fact that that the email did not list the example.com/forum folder structure that it was called from, I thought it was coming from the main forum at example.com instead especially as they both were SMF Forums.

Not so fast...

Thank you guys for your time!

Advertisement: