Advertisement:
NameCheap

Author Topic: SMF Database Error  (Read 3464 times)

Offline Ft. Worth Rider....

  • Semi-Newbie
  • *
  • Posts: 12
SMF Database Error
« on: March 09, 2012, 01:48:33 PM »
Every day,  I receive the following email error and the SMF forum does not work intermittently:

From: MAILER-DAEMON [mailto:MAILER-DAEMON]
Sent: Friday, March 09, 2012 11:29 AM
To: undisclosed-recipients:
Subject: Welcome to Fort Worth HOG's FORUM: SMF Database Error!

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.

The header record for this email shows:
Return-Path: <>
X-Original-To: roy@myemailaddress.com
Delivered-To: roy-xxx-xxx@web1735.linux-hosting.com
Received: from localhost.localdomain (localhost [127.0.0.1])
   by web1735.linux-hosting.com (Postfix) with ESMTP id 1C22D29D80F5
   for <roy@xxx-xxx.com>; Fri,  9 Mar 2012 22:59:05 +0530 (IST)
Subject: Welcome to Fort Worth HOG's FORUM: SMF Database Error!
Message-Id: <20120309172905.1C22D29D80F5@web1735.linux-hosting.com>
Date: Fri,  9 Mar 2012 22:59:05 +0530 (IST)
From: MAILER-DAEMON
To: undisclosed-recipients:;

I assume that the error is coming from the applications unsuccessful attempt to connect to the DB, and I can get the issue by hitting one of the boards and getting a blank page or error page. I have contacted my hosting provider and they don't see any issues or error messages at the Server or DB level. 

I read in another thread that the SMF application will throw this error if it fails to connect to the database.  Is there a timeout parameter that I might be able to increase so that the application will allow slower databases a chance to catch up or something like that?

Any ideas?
« Last Edit: March 09, 2012, 02:13:01 PM by rehinrichs »

Offline K@

  • Lead Support Specialist
  • SMF Master
  • *
  • Posts: 47,362
  • Gender: Male
  • Yum!
Re: SMF Database Error
« Reply #1 on: March 09, 2012, 03:11:13 PM »
Yes, there is. If your host were worth they're salt, they'd know that, because only they can change that.

If they really don't know what to do, tell them they need to adjust "max_execution_time = 30" in php.ini and I'd suggest you get yourself a better host, if they really don't know that.

Offline Illori

  • Doc Coordinator
  • SMF Master
  • *
  • Posts: 36,735
Re: SMF Database Error
« Reply #2 on: March 09, 2012, 03:12:29 PM »
adjusting php.ini has no effect on mysql as it has its own config files etc.

Offline K@

  • Lead Support Specialist
  • SMF Master
  • *
  • Posts: 47,362
  • Gender: Male
  • Yum!
Re: SMF Database Error
« Reply #3 on: March 09, 2012, 03:20:17 PM »
Oh, well. Ignore my post, then. :P

Offline Ft. Worth Rider....

  • Semi-Newbie
  • *
  • Posts: 12
Re: SMF Database Error
« Reply #4 on: March 12, 2012, 11:18:35 AM »
Thanks for the suggestions.  I sent the Hosting company your suggestions:
"Can you see if there is a timeout configuration that we can increase to either reduce or prevent these errors from occurring?  The FORUM support group recommends “they need to adjust  "max_execution_time = 30" in php.ini”  If not this configuration setting, maybe you know where this might be within the MySQL config files.... I am getting many of these errors every day.  Please help."

If I don't get this resolved, and decide to move the forum to another hosting provider, is there a way to do this without losing all the postings?  Does the backup/restore within the SMF Admin application get everything I need?
I will let you know what they do or respond.

Offline K@

  • Lead Support Specialist
  • SMF Master
  • *
  • Posts: 47,362
  • Gender: Male
  • Yum!
Re: SMF Database Error
« Reply #5 on: March 12, 2012, 11:25:11 AM »
Backup by going to your site's CPanel>Files>Backups, coz the SMF one's crap, I'm afraid.

You can get the site (Full home directory) and the database from there. :)

http://wiki.simplemachines.org/smf/Backup

Offline Oldiesmann

  • Lead Developer
  • SMF Super Hero
  • *
  • Posts: 24,206
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: SMF Database Error
« Reply #6 on: March 12, 2012, 12:47:38 PM »
I wouldn't even bother trying to get your existing host to fix the issues. If you're getting errors and/or blank pages, there is definitely a problem, whether they want to admit it or not. The issues you're experiencing are likely due to overloaded/poorly configured servers rather than specific timeout settings.

Offline Ft. Worth Rider....

  • Semi-Newbie
  • *
  • Posts: 12
Re: SMF Database Error
« Reply #7 on: March 12, 2012, 02:18:19 PM »
I really do hope they will fix it or move me to a better server. I have a 10 year hosting deal with them ('coz it was cheaper than the others.....) and moving it would really just bite ! ! !

I just received an email from their tech support..... asked me to try it again.
Refresh 1 = FAILED
Refresh 2 = FAILED
Refresh 3 = FAILED
Refresh 4 = FAILED
Refresh 5 = GOOD
Refresh 6 = FAILED
Refresh 7 = FAILED
Refresh 8 = FAILED
Refresh 9 = GOOD
Refresh 10 = GOOD
Refresh 11 = FAILED
Refresh 12 = FAILED
« Last Edit: March 12, 2012, 02:38:49 PM by Ft. Worth Rider.... »

Offline Ft. Worth Rider....

  • Semi-Newbie
  • *
  • Posts: 12
Re: SMF Database Error
« Reply #8 on: March 13, 2012, 01:24:10 PM »
Received a response to my request for help to the web hosting provider:

Dear Customer,

You need to upload a file onto the Server. The file name should be .htaccess

The file .htaccess should have the following line in it.

max_execution_time =

The value needs to be decided by the web developer.

For more details, you can get in touch with your web developer.

=====================================

I am not a web application developer.  Just a newbie web site admin. Does this make any sense to you?  How do I create the .htaccess file? Notepad? What other entries do I need to place in this file?  Any help would be appreciated.

I am now reading this article to learn more about .htaccess files
http://www.javascriptkit.com/howto/htaccess.shtml [nofollow]

R
« Last Edit: March 13, 2012, 01:30:01 PM by Ft. Worth Rider.... »

Offline K@

  • Lead Support Specialist
  • SMF Master
  • *
  • Posts: 47,362
  • Gender: Male
  • Yum!
Re: SMF Database Error
« Reply #9 on: March 13, 2012, 01:54:15 PM »
Normally, your host would need to set the max_execution_time in their php.ini.

That would override whatever you set in .htaccess.

Unless you have access to that file, which would be unusual.

Offline Ft. Worth Rider....

  • Semi-Newbie
  • *
  • Posts: 12
Re: SMF Database Error
« Reply #10 on: March 13, 2012, 02:20:12 PM »
I created a .htaccess file with notepad, added the entry with max_execution_time 200 as the only line and ftp's it to the www directory of my site.  I obviously don't have access to the file AFTER I uploaded it because it disappeared after a successful upload.

What is interesting is that now the FORUM loads without any errors. 10 out of 10 times = successful.  I don't know if this file is doing it or something else that the hosting provider did, hwoever it is working.  Ill give it a couple of days to see if it sticks.

Thanks ..... 

Offline K@

  • Lead Support Specialist
  • SMF Master
  • *
  • Posts: 47,362
  • Gender: Male
  • Yum!
Re: SMF Database Error
« Reply #11 on: March 13, 2012, 04:36:48 PM »
Fingers crossed, here... :)

MrPhil

  • Guest
Re: SMF Database Error
« Reply #12 on: March 13, 2012, 08:35:44 PM »
It didn't "disappear". Because the name starts with a dot, in many cases your hosting control panel / file manager or your FTP client will hide it. There will be a setting somewhere to show "hidden" files.