Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Juan Carlos on April 18, 2018, 12:24:48 PM

Title: Error: Time offset
Post by: Juan Carlos on April 18, 2018, 12:24:48 PM
I have the forum working perfectly 2.1 (last hithub) and practically without errors but suddenly and every so often these appear.
More than 300. All of the same time and all say time format and time offset
Title: Re: Error: Time offset
Post by: Bigguy on April 18, 2018, 02:46:10 PM
I have never seen this error. Mine runs fine but I don't know what you mean about latest either. Did your copy off GH  today ??
Title: Re: Error: Time offset
Post by: Juan Carlos on April 18, 2018, 04:27:10 PM
Did your copy off GH  today ??

Three days ago
Title: Re: Error: Time offset
Post by: d3vcho(); on April 18, 2018, 04:28:35 PM
Do you have any clues on how to reproduce that error?
Title: Re: Error: Time offset
Post by: Juan Carlos on April 18, 2018, 04:33:42 PM
Not really because the problem is not very frequent.
The only thing I see is that it does not appear with registered users, only with guests.
Title: Re: Error: Time offset
Post by: d3vcho(); on April 19, 2018, 06:00:52 AM
Can you attach your Subs.php file?
Title: Re: Error: Time offset
Post by: Sesquipedalian on April 19, 2018, 12:14:53 PM
The image you shared shows the errors being generated by calls to cron.php.

1. Is it only cron.php that results in these errors, or do the errors sometimes also occur when guests access other pages?

2. Are you using a real cron job to run cron.php? (If you aren't sure, the answer is no.)

3. When you go to https://www.cuatrocuatro.com/foro/index.php?action=admin;area=scheduledtasks;sa=settings, is the "Disable JavaScript-based method of running scheduled tasks" setting checked or unchecked?
Title: Re: Error: Time offset
Post by: Sesquipedalian on April 19, 2018, 12:31:19 PM
4. Do you have any mods installed?

5. Can you please post a screenshot of your list of scheduled tasks (https://www.cuatrocuatro.com/foro/index.php?action=admin;area=scheduledtasks;sa=tasks)?

6. Please compare the times when the errors were reported in your error log (https://www.cuatrocuatro.com/foro/index.php?action=admin;area=logs;sa=errorlog;desc) with the times when your scheduled tasks were run in your task log (https://www.cuatrocuatro.com/foro/index.php?action=admin;area=logs;sa=tasklog). That should help us figure out which task is running when these errors occur.
Title: Re: Error: Time offset
Post by: Juan Carlos on April 19, 2018, 01:34:24 PM
First of all, thanks for the help. I'm going to try the answers one by one

1. Yes, its only with cron.php
2. I am not sure
3. Unchecked
4. Mods Installed:
* Downloads System Pro
* SMF Gallery Pro
* Simple Audio Video Embedder
* Elastic EMail for SMF
5. Screenshot attached.

Attached is the subs.php and the screenshot of the scheduled tasks
6. I can not do it now because I delete the log error, I do it the next time it appears
Title: Re: Error: Time offset
Post by: Sesquipedalian on April 19, 2018, 01:51:50 PM
This is a bit of a long shot, but have you customized any of your email notification templates?
Title: Re: Error: Time offset
Post by: Juan Carlos on April 19, 2018, 02:35:42 PM
No, I just downloaded the latest version of the github and install it cleanly, then install the mods that appear above (without errors), thats all.
Title: Re: Error: Time offset
Post by: Sesquipedalian on April 21, 2018, 11:15:45 AM
The basics problem appears to be that something is calling the timeformat() function from within a scheduled task. That doesn't happen in any of the standard SMF code, so it must be in a mod that you've installed. I've checked Simple Audio Video Embedder and Elastic EMail for SMF, and neither of them look likely to cause this error. But Downloads System Pro and SMF Gallery Pro are both paid mods, so I don't have access to them. It is possible that one or the other of them makes a call to the timeformat() function from within a scheduled task. Try uninstalling one and then the other to see if the errors go away with that mod uninstalled. Then contact the make of whichever one is the culprit for a fix.
Title: Re: Error: Time offset
Post by: Juan Carlos on April 21, 2018, 12:39:13 PM
Thank you for your time.

I will try what you tell me and also I will contact the people of the mods and if I find something I will comment here
Title: Re: Error: Time offset
Post by: vbgamer45 on April 21, 2018, 01:06:24 PM
There is no scheduled tasks in downloads pro or smf gallery pro.
Title: Re: Error: Time offset
Post by: shawnb61 on April 21, 2018, 02:17:14 PM
Another question:  What is the very first error in the log?  Are there any errors in the log other than those two 'undefined index' errors?

Sometimes these errors are secondary...  And it may help to know if there was an originating error.   
Title: Re: Error: Time offset
Post by: Juan Carlos on April 22, 2018, 09:54:25 AM
No, those are the first errors in the log
Title: Re: Error: Time offset
Post by: vbgamer45 on April 22, 2018, 10:47:07 AM
Attach cron.php
Title: Re: Error: Time offset
Post by: Juan Carlos on April 22, 2018, 11:16:19 AM
Attached
Title: Re: Error: Time offset
Post by: shawnb61 on April 22, 2018, 12:06:30 PM
A couple more questions...

Do the error times correspond with any of the execution times for Scheduled Tasks in the Task Log?   (Maintenance | Scheduled Tasks | Task log)

If you run the scheduled tasks manually can you reproduce the error?

Title: Re: Error: Time offset
Post by: Juan Carlos on April 30, 2018, 11:04:25 AM
Yesterday the error was reproduced.
(359 errors in the log).
The only coincidence I can find is a message posted exactly at that time (two seconds before).
The message is very simple, a small comment.
Title: Re: Error: Time offset
Post by: albertlast on April 30, 2018, 11:28:16 AM
There is a pr https://github.com/SimpleMachines/SMF2.1/pull/4740
which i hope get merge in the next time.
when this is merge we got a new function to get more information out of the error log,
but you hat to update your smf (please look at the changes in install/update files) then.
Title: Re: Error: Time offset
Post by: shawnb61 on April 30, 2018, 07:18:58 PM
Did any of the scheduled tasks run at that time?
Title: Re: Error: Time offset
Post by: Juan Carlos on April 30, 2018, 07:45:49 PM
No, no task at that time.
As I mentioned, the only thing that happened at that precise moment was a simple message
Title: Re: Error: Time offset
Post by: albertlast on May 01, 2018, 04:37:19 AM
Since the improved error logging got merge,
i recommand that you upgrade your board to the newer github version,
like mention before look at the database changes which you need to apply on your forum.
Title: Re: Error: Time offset
Post by: Juan Carlos on May 01, 2018, 10:05:35 AM
ok

I suppose that doing the upgrade from the last version of the github those changes in the database will be done automatically. correct?
Title: Re: Error: Time offset
Post by: Kindred on May 01, 2018, 04:00:20 PM
or not...

AFAIK,
we don't build upgraders for use between nightly builds...  by using a beta,/nightly, you have assumed all the responsibility for manually making necessary update changes and have implied that you have the capability to do so.
Title: Re: Error: Time offset
Post by: albertlast on May 02, 2018, 12:42:47 AM
When you use the nightly download from me,
you find a file in your root directory last_commit_<github-version>

in this file you get a url where you can do a comparsion between your version and the github version:
https://github.com/SimpleMachines/SMF2.1/compare/<github-version>...release-2.1

Let's guess that you got a1f315d then the url looks so:
https://github.com/SimpleMachines/SMF2.1/compare/a1f315d...release-2.1

When you open this url,
switch the view to Files changes and scroll down to "other/upgrade_2-1_mysql.sql"
ther you find the changes:
Code: [Select]
ALTER TABLE {$db_prefix}log_error
ADD COLUMN backtrace varchar(10000) NOT NULL DEFAULT '';

got to you phpmyadmin (or any other sql command line tool) and run the command(you had to replace {$db_prefix} with your smf replace typical it's smf_) -> you are down
Title: Re: Error: Time offset
Post by: Juan Carlos on May 02, 2018, 10:54:32 AM
ok

I think these changes are already there.
I downloaded the latest version and added that column to the database.
Now we wait for the error to be reproduced
Title: Re: Error: Time offset
Post by: Juan Carlos on May 07, 2018, 04:39:14 PM
Hello,
Just now the error (590)has appeared again.
I attach the screens with the backtrace
Title: Re: Error: Time offset
Post by: albertlast on May 08, 2018, 09:57:19 AM
Thanks for the backtrace,
the issue in your board is the createNotifybackground task.
Which is created when for example mention someone or you notify on replay is enabled (and some other cases).
Please try this pr: https://github.com/SimpleMachines/SMF2.1/pull/4754
Title: Re: Error: Time offset
Post by: Juan Carlos on May 08, 2018, 11:18:31 AM
Ok

I already made the changes and will continue monitoring.

thanks, a lot of work
Title: Re: Error: Time offset
Post by: Juan Carlos on May 09, 2018, 09:53:27 AM
Hi,

The error is still there.

I attach the new screens
Title: Re: Error: Time offset
Post by: albertlast on May 13, 2018, 07:01:08 AM
In my eyes the error is not a differen one,
but i try to guess the issue and fixed this also in the pr.
Please try the new version of the pr.