MyBB Community Forums

Full Version: Statistics require constant recount
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey, I was wondering if anyone knew why my statistics don't update unless I recount and rebuild, I've had to do this 3 times to see the latest statistics on the forum.
No-Cache is enabled
To get the latest statistics on my forum I need to recount and rebuild every time in order for it to update, I have no-cache enabled and whenever I do recount and rebuild I do get the latest stats, it just isn't doing it automatically, statistics cache time is set to 0 in the config as well.
The forum is currently not accessible to the public web but it's running on a ubuntuĀ 20.04 machine with nginx 1.22.0
If you look at the source code for any page, do you see this near the bottom, after the Powered by MyBB statement?

<!-- The following piece of code allows MyBB to run scheduled tasks. DO NOT REMOVE --><!-- End task image code -->

or perhaps with the task bug like this?

<!-- The following piece of code allows MyBB to run scheduled tasks. DO NOT REMOVE --><!-- start: task_image -->
<img src="https://mydomain.com/forum/task.php" width="1" height="1" alt="" />
<!-- end: task_image --><!-- End task image code -->
(2022-11-27, 10:36 PM)HLFadmin Wrote: [ -> ]If you look at the source code for any page, do you see this near the bottom, after the Powered by MyBB statement?

<!-- The following piece of code allows MyBB to run scheduled tasks. DO NOT REMOVE --><!-- End task image code -->

or perhaps with the task bug like this?

<!-- The following piece of code allows MyBB to run scheduled tasks. DO NOT REMOVE --><!-- start: task_image -->
<img src="https://mydomain.com/forum/task.php" width="1" height="1" alt="" />
<!-- end: task_image --><!-- End task image code -->

oh, no, just checked index and I don't
That should be in your footer template.
(2022-11-28, 11:19 AM)Matt Wrote: [ -> ]That should be in your footer template.

Thanks, I've added it but the stats still don't appear to be updating, would I need to run another recount and rebuild to get it started or would something else need to be in place
Can we have your URL to check? If you go to ACP > Configuration > Server and Optimization Options > Error Type Medium > Warnings and Errors, you can see errors being produced, which may prevent the stats being rebuilt. You can also hide these errors but log them somewhere with the Error Logging Medium setting.
(2022-11-28, 03:52 PM)Matt Wrote: [ -> ]Can we have your URL to check? If you go to ACP > Configuration > Server and Optimization Options > Error Type Medium > Warnings and Errors, you can see errors being produced, which may prevent the stats being rebuilt. You can also hide these errors but log them somewhere with the Error Logging Medium setting.

Logging errors but not seeing anything task related, also I know tasks.php is being called because the task log is getting updated but stats just aren't updating
The stats will be rebuilt in a shutdown query which will not be running if there are errors generated on the page, so the errors will need to be fixed.
(2022-11-28, 05:07 PM)Matt Wrote: [ -> ]The stats will be rebuilt in a shutdown query which will not be running if there are errors generated on the page, so the errors will need to be fixed.

just errors? or warnings too? because all I have on my index page is warnings at the minute

(2022-11-28, 05:07 PM)Matt Wrote: [ -> ]The stats will be rebuilt in a shutdown query which will not be running if there are errors generated on the page, so the errors will need to be fixed.

Could I perhaps be missing a task in the task manager that executes the recount?
Pages: 1 2