wpsharks / comet-cache

An advanced WordPress® caching plugin inspired by simplicity.
https://cometcache.com
GNU General Public License v3.0
77 stars 18 forks source link

Bug: Possible Time Calculation Issue #853

Closed jaswrks closed 7 years ago

jaswrks commented 7 years ago

Referencing internal/private ticket: http://jas.xyz/2f8st76 This issue may be related to the new HTML notes in the latest release. Not yet confirmed.

raamdev commented 7 years ago

Referencing additional details from the internal ticket:

See screenshot:

2016-11-23 as 11 11 00

renzms commented 7 years ago

@raamdev

Unable to reproduce error

WordPress Version: 4.6.1 Current WordPress Theme: Twenty Sixteen version 1.3 Theme Author: the WordPress team - https://wordpress.org/ Theme URI: https://wordpress.org/themes/twentysixteen/ Active Plugins: Comet Cache Pro Version 161119

screen shot 2016-11-26 at 1 53 31 pm

screen shot 2016-11-26 at 1 53 04 pm

Results From and including: Saturday, 26 November 2016 To, but not including Saturday, 24 December 2016 Result: 28 days


Notes based on information from internal ticket

Referencing internal/private ticket: http://jas.xyz/2f8st76

Cache Expiration time: 28 Days

Based on first screenshot:

From: Tuesday, 22 November 2016, 17:53:00 To: Monday, 15 October 2063, 11:47:00

The duration is 17,127 days, 17 hours, 54 minutes and 0 seconds or excluding the exact time but not including the day of : 17,128 days

Based on second set of screenshots

Cache Expiration time: 21 Days

From: Wednesday, 23 November 2016, 23:12:00 To: Wednesday, 17 October 2063, 22:24:00

The duration is 17,128 days, 23 hours, 12 minutes and 0 seconds or excluding the exact time but not including the day of : 17,129 days

Looks like the error on customer's test site is always adding 17,128 days give or take a couple hours. Could it be a possible error on customer's server host time? Or a conflict with another plugin?

raamdev commented 7 years ago

@renzms Thank you for the additional testing.

@jaswsinc Had you done any code review prior to posting this issue? Would you like me to leave this open for further research or do you feel this was most likely user-specific?

jaswrks commented 7 years ago

Yes, I'd like to leave this open for further research. My best guess at the moment is that this occurs whenever you also enable the load average check in Comet Cache.

Notice that cache_max_age is forced to 0 here, leading to an invalid time calculation later: https://github.com/websharks/comet-cache-pro/blob/161119/src/includes/traits/Ac/ObUtils.php#L215

raamdev commented 7 years ago

@renzms Can you try reproducing this with the Load Average Check enabled? See Comet Cache → Plugin Options → Cache Expiration Time → Disable Cache Expiration If Server Load Average is High?

renzms commented 7 years ago

@raamdev

Confirmed able to reproduce Bug

WordPress Version: 4.7 Current WordPress Theme: Twenty Sixteen version 1.3 Theme Author: the WordPress team - https://wordpress.org/ Theme URI: https://wordpress.org/themes/twentysixteen/ Active Plugins: Comet Cache Pro Version 161221

At lower Server Load Average numbers, it causes the invalid time calculation.

Correct Calculation at Server Load Average .70

Set at 28Days

screen shot 2016-12-22 at 5 12 15 pm

Front end HTML notes

screen shot 2016-12-22 at 5 11 55 pm

Incorrect Calculation at Server Load Average .01

Set at 28Days

screen shot 2016-12-22 at 5 14 10 pm

Front end HTML notes

screen shot 2016-12-22 at 5 14 55 pm

renzms commented 7 years ago

Fix Confirmed Working, see comments here

raamdev commented 7 years ago

Comet Cache Pro v161226 has been released and includes changes from this GitHub Issue. See the v161226 announcement for further details.


This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#853).