News:

Join the Facebook Fan Page.

Main Menu

Empty error log

Started by casey_mrc, October 29, 2024, 07:44:32 PM

Previous topic - Next topic

casey_mrc

SMF v2.1.3
PHP v7.4
MariaDB V10.6.18

I have had an empty error log for some (embarrassingly) long time and I am seeking help to fix it.

The problem almost certainly started with a late 2.0.X or early 2.1.X verson of SMF. Well over a year ago, the error log was clocking up multiple reports per second. It first came to my attention (IIRC) because I had a warning about my server storage space runing out. The  error log list was so large that I could not clear it successfully from the SMF Admin panel. Desperate to get some space back, I discovered an (IIRC ~2Gb) "error log" (or similar name) through the CP and file explorer. I deleted this file and the error log cleared. But, the logs simply kept clocking up again (but the forum was working OK from a user viewpoint). I may have deleted this file several times to keep storage from running out. Plus, I updated the forum to a newer version, in the hope of solving the issue. At some point, the problem stopped. But, since then, I have had an empty error log, which isn't viable. I now have more time to devote to pr-actively managing the forum, which I haven't for the past few years, with life getting in the way, only allowing me time to firefight forum problems.

I found this "related" topic, https://www.simplemachines.org/community/index.php?topic=581264.0 and posted over there, but was advised to start a new topic (this one) in the correct forum area.

To repeat the relevant bits of what I did post in the wrong forum support area;

Quote from: casey_mrc on October 29, 2024, 05:41:57 PM......

I have checked that logging is enabled in the SMF Admin page

I have run some of the checks as recorded above, notably:

smf_settings - enableErrorLogging =1
Settings.php - not sure what to check in there?
Error log table - auto_increment value. Where can I find this to  check the value?

I did go through a period where error logging was PROFUSE - many error logs per second, so I wonder if the autoincrement ID has hit the buffers at 16 million and needs to be reset?

I do have TapaTalk v5.1.3 MOD installed (I hate it, but some users insist on it!)

At this point I should point out I am not very knowledgeable about SQL and databases, but I can follow instructions and have done some coding in the past (mostly BASIC!! - I was around in the days before the Intel 4004 microprocessor  ;) ), so I understand the fundamentals. Please be gentle!

Loving SMF, I have run a forum on it for over 10 years now. Any help would be very much appreciated.

Sir Osis of Liver

Error log is not a file, it's a database table - (prefix)log_errors.  Did you empty (truncate) the table or delete (drop) it?  If your database doesn't contain a log_errore table bad things will happen.

When in Emor, do as the Snamors.
                              - D. Lister

casey_mrc

Firstly, thanks for replying, it is appreciated.

Yes, I have a log error table. I can view it in phpMyAdmin. The table is completely empty. I have not dropped or altered anything in the database, just looked to see if there was a clue as to the cause of the empty log report in SMF.

I'll send a screenshot of the phpMyAdmin screen later (on phone at moment), to see if someone can spot anything strange, but I'm 99.9% thinking the database table is fine, just no records in there.

I don't understand the process by which the table is populated. Presumably, there is a php file (or several), capturing errors and writing records in to the database, but this (apparently) isn't happening.

I'm certain, maybe up to 5 years ago , I had found a file with "error" in the title which was growing rapidly in sizee very day, in line with growing SMF error logs. When I deleted this file, the error log entries cleared when viewed in SMF (and immediately started growing again). Was the error process different in earlier versions of SMF, or what else could have generated a very large file rapidly? 

@rjen

Maybe first check the settings?

Go to Admin > Maintenance > Logs > Log settings

Is your error logging set to active?
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Doug Heffernan

Quote from: casey_mrc on October 30, 2024, 04:04:35 AMI'm certain, maybe up to 5 years ago , I had found a file with "error" in the title which was growing rapidly in sizee very day, in line with growing SMF error logs. When I deleted this file, the error log entries cleared when viewed in SMF (and immediately started growing again). Was the error process different in earlier versions of SMF, or what else could have generated a very large file rapidly? 

What file was that? As mentioned above, the error messages are logged and stored in the database and not in files.

Anyways, I also think that you haven't enabled the error log currently. Hence why it's table is empty.

casey_mrc

Thanks for your reply Doug and @rjen. Is there somewhere else I need to anable error logging?

Doug Heffernan

Quote from: casey_mrc on October 30, 2024, 07:16:41 AMThanks for your reply Doug. Is there somewhere else I need to anable error logging?

That's the only place. Was it already enabled or did you just enable it? If the former, it means that there haven't been any errors, otherwise they would have been logged in. If the latter, all errors from this point forward will be logged in and displayed in the error log page.

casey_mrc

Sorry, I should have been clearer. That error logging select box has never been unticked.

There have been errors when my host changed platforms a few months back. I had to try various new SMTP settings and when I tried to send a test email, several failed and I'm 90% sure the message was, "check your error log for details". There was nothing in the error log. EDIT: I have just deliberately set my SMTP config incorrectly and sent a test message. A screen shot of the error message is now attached. There are still no entries in the error log.

There have been zero error logs for well over a year (no pruning set), I can't believe my forum is running that smoothly?  ;)

Here are a screenshots of the smf_log_errors table and the structure - just in case anyone with more knowledge than me can spot something amiss.


casey_mrc

So, my understanding is that I have a functioning, but empty, table.

I have enabled error logging.

There has to be an issue with the process/code that detects an error and creates a record in the database?

Does that make sense?

casey_mrc

Going back to my original post, could this be an issue with the Error log table - auto_increment value? Where can I find this to check the value?

The other topic (tahe I linked in the first post) found that auto_increment had reached the max 16 million ID value and was not creating any new error records - resetting the value to 2 resolved the issue for that forum.

As I have previous had an issue with HUGE numbers of error logs, could this have happened in my case too?

Chen Zhen


If you empty (not drop) the error log table in phpmyadmin it will truncate it which resets the increment.

This is unlikely the issue. Check your actual PHP error log from your host panel or terminal. If that is empty then your PHP log settings may be disabled. Check the PHP info from your SMF admin server settings to see if error logging settings are enabled properly.

My SMF Mods & Plug-Ins

WebDev

SMF support staff should be shaping a positive community experience & not provoking an argument or emotional reaction.

Kindred

the error.log FILE is created by your SERVER (not SMF)

the error log in the database tracks errors within SMF.

the two may not be at all related in many/most cases -- since errors at the server level may occur before SMF even gets to see the query.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

casey_mrc

Quote from: Chen Zhen on October 30, 2024, 08:25:02 AMIf you empty (not drop) the error log table in phpmyadmin it will truncate it which resets the increment.

This is unlikely the issue.

Well, I haven't emptied the log in SMF for some considerable time, as it's been empty already. I've never emptied the table via phpMyAdmin either. But, good, it seems that cause is ruled out.

Quote from: Chen Zhen on October 30, 2024, 08:25:02 AMCheck your actual PHP error log from your host panel or terminal. If that is empty then your PHP log settings may be disabled. Check the PHP info from your SMF admin server settings to see if error logging settings are enabled properly.

PHP settings in host CP show as attached. Hmmm, I've never been in this area before, but should that "display_errors" be activated? I've no idea what the string in the "error_reporting" is about. I have also attached a screenshot of an error log in my StackCP panel. I assume this is the PHP generated error log (it's not obvious from StackCP panel)? There is stuff in there.




Kindred

that's outside of SMF support, but it looks like you have an issue with your wiki software
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

casey_mrc

Yeah, I'm aware of the wiki issue. It hasn't been maintained for years  :o . I was in the process of upgrading through the recommended DOKU stable updates since 2014. I was up to the 2020 update at 12.45am this morning, when I parked it to complete later. I don't think this is any way related to the error log issue though?

casey_mrc

Is this helpful/relevant? From the SMF Admin....PHP Info area.

Illori

it should not be related to this issue in anyway. before we know there is an issue with your error log, you need to determine if any errors have been logged in the server logs and NOT in the SMF log. you just may be lucky and not have any to be logged.

casey_mrc

Aren't the server error logs the listing I screenshotted above, from the StackCP?

Illori

those are not SMF errors, so the SMF error log would not be aware of them to log them.

if you open a private tab/browser and attempt to log into your account with an incorrect password is that error logged?

casey_mrc

Quote from: Illori on October 30, 2024, 11:28:16 AMif you open a private tab/browser and attempt to log into your account with an incorrect password is that error logged?

No error logged when I do this.

Advertisement: