News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Stop logging user errors

Started by Sir Osis of Liver, June 28, 2018, 01:02:55 AM

Previous topic - Next topic

Sir Osis of Liver

Getting a lot of user errors, mostly bans and incorrect passwords.  Clutters up the error log, and buries more important errors.  If I remove the 'user' error type from the array -

Errors.php



// What types of categories do we have?
$known_error_types = array(
'general',
'critical',
'database',
'undefined_vars',
'user',
'template',
'debug',
);



will bad things happen? ???


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

I don't have an exact answer to the question, but I would not want to hide user errors. They can be good clues when something bad does happen.
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

Sir Osis of Liver

They tend to accumulate over time, this a very old forum, and they're logging dozens of user errors daily, mostly bans.  It's bad enough many admins never check their log, but if they do get around to it they have to wade through a lot of stuff that's not really important to find errors that are significant, so they don't bother.  Maybe I'll just suggest they filter and delete the user errors weekly, or something like that, just to keep the log manageable. 

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

That is what I do, check the logs weekly or so, and prune what I think is unnecessary.
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

Sir Osis of Liver

Worked on a couple of forums that had 7-8 million errors logged.  One guy's db was around 3 gb, after emptying the log it was 2-3 mb.  Putting the error count in admin tab in 2.1 is a good idea.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

Ouch, I've come across forums with hundreds of thousands errors, but I don't think I've seen over a million.
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

Arantor

I've seen multiple millions before, it's why I encouraged the count being so visible.

aegersz

i prune often but was horrified to see 429 pages of errors.

i just delete them and try not to let them bother me ~ my forum still ticks over just fine.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

Quote from: Sir Osis of Liver on June 28, 2018, 01:43:44 AM
Worked on a couple of forums that had 7-8 million errors logged.  One guy's db was around 3 gb, after emptying the log it was 2-3 mb.  Putting the error count in admin tab in 2.1 is a good idea.

😨😨😨
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Shambles

I just set "log pruning" to 7 days. Not arsed what kind of errors they are as I check the EL several times a day so I know if something's iffy, or if a trend is occurring.

GigaWatt

About the error logs, just a quick question about 2.1. Is there a way to remove the number of errors next to the admin menu? The default admin menu shows up in the menu bar like Admin (number of errors). Yes, I would like to know the number of errors the forum's accumulated over time, but not right out in the admin menu button, like having a PM :D. I'd prefer if the text was just Admin and I could manually check up on errors from time to time ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Shambles


Arantor

Not without changing 2.1. The whole point of that being there is to make you look and it and see if you need to do something about it.

Illori

if you remove user from that array all that will happen is that you will no longer see user as a filter option for the error log. you would need to search through the code and stop the generation of the errors.

GigaWatt

Quote from: Arantor on June 28, 2018, 09:36:25 AM
Not without changing 2.1. The whole point of that being there is to make you look and it and see if you need to do something about it.

Yeah, but the number of errors will still stay there even if you've checked the errors (visited the error log). The only way for the number to disappear from the admin button from the menu is to remove (delete) the errors from the error log :S.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Arantor

Well, yes, fix the cause of the errors, then delete them from the database rather than letting it grow bigger.

Still not seeing the problem here.

Aleksi "Lex" Kilpinen

I can actually... Think of someone with a slight OCD tendency, wanting to keep any error they might want to return to, or follow up, or just keep an eye on for a longer period of time - and expecting to be able to do that, AND clear any notifications of old errors they may have.

Could absolutely kill me. I mean that person.
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

Arantor

Great, so instead of tracking errors, which is already problematic enough, we would need to track the read status of every error for every admin.

Not viable, not if people keep having sites with millions of errors. Especially with recent changes that make the error log considerably larger anyway.

Aleksi "Lex" Kilpinen

Yeah, I know. Just thinking outloud. Perhaps a toggle for the visible count? Default could be on.
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

Arantor

I personally wouldn't implement it, but I could imagine Sesquipedalian doing so. I'm just not a fan of "make all the things configurable", it's a path of maintenance madness.

And turning it off likely means people will forget to check, and then be all shocked when their entire DB space is taken u with error logs.

Advertisement: