News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

There has been a problem with the database.

Started by Tetsuo, February 20, 2009, 01:21:18 PM

Previous topic - Next topic

Tetsuo

Hi,

I've been getting this e-mail sent to me by my host for a long time now, and a got it with my previous host as well, but not as often as now. I get a simple email that says ""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."

I've been in contact with my host, and they cannot see anything wrong with my account so they suggested i try here. I've gotten reports from my users that the site is down from a minute up to half an hour at max before the site works again flawlessly. I'm not really sure where i could start to dig for more information on this problem as i just get this silly error message that doesn't really tell me anything about the problem. However, ill paste here an recent error log from my cpanel if that would give some clues.

[Fri Feb 20 11:17:05 2009] [error] [client 88.112.102.181] File does not exist: /home/tervahau/public_html/favicon.ico [Fri Feb 20 11:17:05 2009] [error] [client 88.112.102.181] File does not exist: /home/tervahau/public_html/404.shtml Can't use string ("2.3") as a HASH ref while "strict refs" in use at ./404.cgi line 159. Can't use string ("2.3") as a HASH ref while "strict refs" in use at ./404.cgi line 159. [Fri Feb 20 11:17:08 2009] [error] [client 88.112.102.181] File does not exist: /home/tervahau/public_html/favicon.ico [Fri Feb 20 11:17:08 2009] [error] [client 88.112.102.181] File does not exist: /home/tervahau/public_html/404.shtml [Fri Feb 20 11:17:10 2009] [error] [client 208.111.154.15] Failed loading /usr/local/Zend/lib/Optimizer/php-5.2.x/ZendOptimizer.so: /usr/local/Zend/lib/Optimizer/php-5.2.x/ZendOptimizer.so: undefined symbol: compiler_globals [Fri Feb 20 11:17:15 2009] [error] [client 84.253.202.62] File does not exist: /home/tervahau/public_html/favicon.ico [Fri Feb 20 11:17:15 2009] [error] [client 84.253.202.62] File does not exist: /home/tervahau/public_html/404.shtml [Fri Feb 20 11:17:16 2009] [error] [client 84.253.202.62] File does not exist: /home/tervahau/public_html/favicon.ico [Fri Feb 20 11:17:16 2009] [error] [client 84.253.202.62] File does not exist: /home/tervahau/public_html/404.shtml [Fri Feb 20 11:17:24 2009] [error] [client 80.222.46.53] File does not exist: /home/tervahau/public_html/favicon.ico [Fri Feb 20 11:17:24 2009] [error] [client 80.222.46.53] File does not exist: /home/tervahau/public_html/404.shtml [Fri Feb 20 11:17:28 2009] [error] [client 61.135.168.142] Failed loading /usr/local/Zend/lib/Optimizer/php-5.2.x/ZendOptimizer.so: /usr/local/Zend/lib/Optimizer/php-5.2.x/ZendOptimizer.so: undefined symbol: compiler_globals [Fri Feb 20 11:17:30 2009] [error] [client 87.189.241.12] user bibloeros not found: /releases/DJ_The_Secretary_and_the_Delicious_Meal_[Biblo_Eros].zip, referer: http://www.hackthemainstream.com/projects/project_secretary3.cfm

Any ideas please?

I'm a bit confused about the error with favicon.ico file,  the forum software is installed in a different folder than that where it is looking this file from. whats up with that?

Xylar2

No idea about the favicon.ico, but if you told us what host you are usigng, it may help. Or at least whether it's Windows, Unix: CentOS, Linux etc. Windows will cause these kind of problems. Also maybe someone else on the same host has a massive SQL script in progress that will take 3 weeks.

Tetsuo

Sure thing !The host is hxxp:hostmonster.com [nonactive] and the os seems to be linux. Anything else i've missed to tell you, lt me know, i'll do my best to provide.

Tetsuo

bit of a bump here, would really be glad for some help.


karlbenson

favicon ones, are browsers/search engines trying to find your favicon.
Since you don't have a file for that, its adding an error in your apache error log.

As for 'There has been a problem with the database".
SMF sends you this email when php/apache is working, but for some reason smf was unable to connect to the db.

If its happening regularly it is a sign of overloaded/up&down/crashing mysql server.
The only option to fix it is switch to a more reliable host.

RobertMfromLI

Quote from: regularexpression on March 15, 2009, 04:35:53 PM
favicon ones, are browsers/search engines trying to find your favicon.
Since you don't have a file for that, its adding an error in your apache error log.

As for 'There has been a problem with the database".
SMF sends you this email when php/apache is working, but for some reason smf was unable to connect to the db.

If its happening regularly it is a sign of overloaded/up&down/crashing mysql server.
The only option to fix it is switch to a more reliable host.

Other causes: this can occur when you are doing a backup (especially on a larger forum with compression enabled), when doing a search on (the entirety of) a larger forum and their are multiple search terms.

When it comes to ISPs, as regularexpression noted, that can be a big problem. We had to be moved to a dedicated box to prevent CPU overloads. On a shared box, with who knows what else running, these problems were commonplace - and our forums aren't that horrendously large (under 90,000 posts - see here for our stats: http://www.simplemachines.org/community/index.php?topic=309858.msg2077996#msg2077996).





Now, another problem I noted, even on the new box (because it still has CPU quotas set - which they wont (or dont know how to) remove) is that Microsoft's and Yahoo's IdiotBots would cause the same problem as well. They'd send a few hundred spiders to the site at once - often with 2, 3, 4, or 10 or more on the same topic/thread. There is a "fix" for that - namely editing your robots.txt file (add this):

User-agent: *
Crawl-delay: 10


While they still send out tons of bots at once, the bots dont rapid-fire attempt to read page after page. The crawl delay is in seconds. Play with it until you are happy with the results.

I determined this (which may be the first step you want to try) by watching the "Who's Online" section (and/or after such errors checking the server logs) at which point I'd see literally a few hundred bots (our normal site traffic is 10-50 users at a time - the numbers shown on our stats page that are above that is mostly bots).

The other solution to this of course is to disable Guest Access.





And finally, though I didnt glean what OS you are using (I may simply have missed it - am doing 4 things at once), Windows does not scale nearly as well as ____________ when it comes to this type of traffic (fill in blank with anything you want: Linux, AIX, OS/2, eComStation, etc).

Our original forum was running on a Windows server (more powerful no less) and crashed regularly.

Best,
Rob

Star Trek New Voyages: Kirk's Five Year Mission Continues
Line Producer - Webmaster - Forum Admin - Contributing Producer - Gaffer


Star Trek Phase 2 - Enemy: Starfleet Released!

unclegusy2k

I to am having problems with emails comming through every so often saying "This is a notice email to let you know that SMF could not connect to the database, contact your host if this continues."

I am hosting with POW WEB and didnt have this problem when i was with bravehost? ive looked at all my settings and they seem fine and everything looks fine aswell? not sure if im missing somewhere else to look?


Advertisement: