SMF 2.0.15 - Crash - loss of file paths - due database connection error email

Started by Kiriakos GR, December 08, 2017, 06:29:58 PM

Previous topic - Next topic

Kiriakos GR

Today I had one good adventure, by me simply activating:   Administration Center » Server Settings » Database and Paths   >>  Send emails on database connection error
and by using save button ,  my forum configuration was crashed.

All that I could see was white background and text. 

My first thought was database corruption, and I did upload backup but this did not helped.
Neither it helped at uploading backup of SMF Default Theme - Curve ...

When everything that I could think of as reasonable explanation this failed, then I did use latest   SMF Settings Repair Tool and this did correct the problem, by me selecting the use of default settings. 

The on million dollars question this is how this thing happened ?  I just tick the box about getting database connection error emails, and entire forum this collapsed.

After new settings restoration with SMF Settings Repair Tool, I did test again and there is no issues, I can enable or disable database email alerts.

And now I do wonder if older forum configuration this made by previews version of SMF Settings Repair Tool at older SMF version, this become somewhat incompatible to latest SMF 2.0.15 ?
When this incident ( my forum crash ) was active,  I did not get any error logs.
And internal function of database check, it did finish with out errors.


 

Arantor

No, the page you were on saves settings back to Settings.php and sometimes autocomplete in browsers causes it to save bad answers to questions.

Or a bad mod.

Kiriakos GR

Bad mod this is out of question.
Browser issue?  ...  Firefox 52 esr , now if mouse pointer this parked in a field and this added a space ( change ) at theme directory path and this messed up the settings ... this is a long shot but theoretically possible.

My suggestion for avoidance of  this from happening to others, it would be useful if SMF detects that Admin does a file path change, to be there an confirmation dialog with (Yes/No ) options. 


Arantor

Is it really out of the question, though? You have absolutely no mods that add to that page?

My suggestion is that this entire page should actually be removed because if the settings work to get to the page, changing things is almost certainly going to break the forum...

Kiriakos GR

I am not using any mod this related to Server Settings.

From the other hand if tick boxes:
Use a persistent connection
Send emails on database connection error
Automatically fix broken tables

All moved to another (new) forum tab ( database advanced settings), then fewer things can go wrong.

Arantor

Nope.

Using a persistent connection is something that you only need to do if you are on a server where this works well. For 99% of users this setting doesn't have any use, and for the fraction of users that understand what it does, they're going to be competent enough to change the Settings.php file by hand.

The send emails on DB connection error doesn't work properly. Not sure it ever has, and it should really be removed at this point because either it's broken temporarily (in which case it'll fix itself before you get there), or it's broken outright (in which case you'll notice presuming you care about your forum, and if you don't care about your forum, you probably don't care about the errors and just want to turn them off, so might as well remove the function)

The auto fix broken tables function doesn't work properly either and given the nature of it, should really be removed.

Kiriakos GR

The auto fix broken tables function ( this is On - default setting)
Using a persistent connection function ( this is Off - default setting)
Emails on DB connection error function ( this is Off - default setting)

I did read here (in the past) a few user reports of them getting repeatedly false alert emails relative to database connection, and temporarily cure this is such function to be disabled.
But it seems to me that most SMF owners when relaying at hands of  REAL professional hosting services (well tuned servers ) they do not have issues.

Reliable hosting service will not use single machine for files hosting and database hosting, in such scenario if this box goes down, everything goes down including email server.
In regular conditions, files and database they are separated (different machines), and even better this is using dedicated mail server as I do, and if hosting has issues my communication with the world this stays intact.

Personally I do not have control over the database server, if I did ?  I would try to stop it ( just to see if alert-email will be sends )         

Arantor

In other words, on a well set up environment you won't see the email basically ever... so why have the option? It's not like it can be fixed by the user in most cases...

Kiriakos GR

In a Well setup environment, if database server this fail, web hosting server and email server will sends this email alert to me.

Are most SMF forum owners educated enough of what is an Well setup environment?  This is their own additional obligation so to discover it.

Aleksi "Lex" Kilpinen

If the repair settings -tool worked, then the problem was most likely in the settings file rather than the DB really. Without knowing what you had to fix exactly in the settings, it is hard to say much more really.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: