Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Possible Time Calculation Issue #853

Closed
jaswrks opened this issue Nov 23, 2016 · 8 comments
Closed

Bug: Possible Time Calculation Issue #853

jaswrks opened this issue Nov 23, 2016 · 8 comments
Assignees
Labels
bug

Comments

@jaswrks
Copy link

@jaswrks jaswrks commented Nov 23, 2016

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
Copy link
Contributor

@raamdev raamdev commented Nov 25, 2016

Referencing additional details from the internal ticket:

  • Cache Expiration Time was set to 28 days.
  • When viewing the HTML source for a cached page, the expiration date has a year of 2063:

See screenshot:

2016-11-23 as 11 11 00

@renzms
Copy link

@renzms renzms commented Nov 26, 2016

@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

  • set Cache Expiration time to 28 days

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

  • visited front end for html notes

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
Copy link
Contributor

@raamdev raamdev commented Nov 26, 2016

@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
Copy link
Author

@jaswrks jaswrks commented Nov 26, 2016

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 raamdev assigned jaswrks and unassigned renzms Nov 29, 2016
@raamdev
Copy link
Contributor

@raamdev raamdev commented Dec 21, 2016

@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
Copy link

@renzms renzms commented Dec 22, 2016

@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

@jaswrks jaswrks removed the needs estimate label Dec 22, 2016
@raamdev raamdev added this to the Next Release milestone Dec 22, 2016
@raamdev raamdev modified the milestones: Next Release, Maintenance Release Dec 22, 2016
jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Dec 23, 2016
jaswsinc
…ks are enabled in Comet Cache configuration options. See [Issue #853](wpsharks/comet-cache#853).
@raamdev raamdev removed the needs research label Dec 23, 2016
raamdev added a commit that referenced this issue Dec 23, 2016
- **Bug Fix:** Resolves error `Unable to determine UA info directory location` when upgrading to latest release. See [Issue #862](#862).
- **Bug Fix:** Enhancing compatibility with InfiniteWP, ManageWP, and other remote management tools for WordPress. See [Issue #862](#862).
- **Bug Fix:** Incorrect time calculations whenever load average checks are enabled in Comet Cache configuration options. See [Issue #853](#853).
- **Cleanup:** Removed an old API call that checked for a newer lite version. No longer necessary.
@renzms
Copy link

@renzms renzms commented Dec 25, 2016

Fix Confirmed Working, see comments here

raamdev added a commit that referenced this issue Dec 26, 2016
_**Note:** This is a Comet Cache Pro maintenance release._

- **Bug Fix** (Pro): Resolves error `Unable to determine UA info directory location` when upgrading to latest release. See [Issue #862](#862).
- **Bug Fix** (Pro): Enhancing compatibility with InfiniteWP, ManageWP, and other remote management tools for WordPress. See [Issue #862](#862).
- **Bug Fix** (Pro): Incorrect time calculations whenever load average checks are enabled in Comet Cache configuration options. See [Issue #853](#853).
- **Cleanup:** Removed an old API call that checked for a newer lite version. No longer necessary.
@raamdev
Copy link
Contributor

@raamdev raamdev commented Dec 26, 2016

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).

@raamdev raamdev closed this Dec 26, 2016
@wpsharks wpsharks locked and limited conversation to collaborators Dec 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.