- b2evolution CMS Support Forums
- b2evolution Support
- General Support
- Error with job: Prune old hits & sessions (includes OPTIMIZE)
1 agent_kith Jan 25, 2021 07:31
Have a weird error when running scheduled job (via cron.php).
From evoadm.php
Status: Error
Real start time: 25/01/21 07:20:01 am
Real stop time: 25/01/21 07:20:01 am
Duration: 0 seconds
# of actions: 20
Messages: STATUS:
T_basedomains: MyISAM - 1497 rows
Action #1 Finished. Elapsed time since beginning of task: 0.103 seconds
T_hitlog: MyISAM - 3717 rows
Action #2 Finished. Elapsed time since beginning of task: 0.103 seconds
T_sessions: MyISAM - 8282 rows
Action #3 Finished. Elapsed time since beginning of task: 0.103 seconds
T_track__goalhit: MyISAM - 0 rows
Action #4 Finished. Elapsed time since beginning of task: 0.103 seconds
AGGREGATING:
Aggregate the rows from T_hitlog to T_hits__aggregate, Execution time: 0.005 seconds
Action #5 Finished. Elapsed time since beginning of task: 0.108 seconds
Aggregate the rows from T_track__goalhit to T_track__goalhit_aggregate, Execution time: 0.000 seconds
Action #6 Finished. Elapsed time since beginning of task: 0.108 seconds
Aggregate ONLY collection browser sessions from T_hitlog to T_hits__aggregate_sessions, Execution time: 0.003 seconds
Action #7 Finished. Elapsed time since beginning of task: 0.111 seconds
Aggregate ONLY collection API sessions from T_hitlog to T_hits__aggregate_sessions, Execution time: 0.001 seconds
Action #8 Finished. Elapsed time since beginning of task: 0.112 seconds
Aggregate ALL browser sessions from T_hitlog to T_hits__aggregate_sessions, Execution time: 0.002 seconds
Action #9 Finished. Elapsed time since beginning of task: 0.114 seconds
Aggregate ALL API sessions from T_hitlog to T_hits__aggregate_sessions, Execution time: 0.001 seconds
Action #10 Finished. Elapsed time since beginning of task: 0.115 seconds
PRUNING:
0 rows from T_track__goalhit, Execution time: 0.000 seconds
Action #11 Finished. Elapsed time since beginning of task: 0.115 seconds
0 rows from T_hitlog, Execution time: 0.002 seconds
Action #12 Finished. Elapsed time since beginning of task: 0.117 seconds
1000 rows from T_sessions, Execution time: 0.018 seconds
Action #13 Finished. Elapsed time since beginning of task: 0.135 seconds
262 rows from T_sessions, Execution time: 0.037 seconds
Action #14 Finished. Elapsed time since beginning of task: 0.173 seconds
Total 1262 rows from T_sessions, Execution time: 0.056 seconds
Action #15 Finished. Elapsed time since beginning of task: 0.173 seconds
0 rows from T_basedomains, Execution time: 0.005 seconds
Action #16 Finished. Elapsed time since beginning of task: 0.178 seconds
OPTIMIZING:
T_hitlog: 0.017 seconds
Action #17 Finished. Elapsed time since beginning of task: 0.196 seconds
T_track__goalhit: 0.000 seconds
Action #18 Finished. Elapsed time since beginning of task: 0.196 seconds
T_sessions: 0.010 seconds
Action #19 Finished. Elapsed time since beginning of task: 0.206 seconds
T_basedomains: 0.000 seconds
Action #20 Finished. Elapsed time since beginning of task: 0.206 seconds
Total execution time: 0.103 seconds
And from the standard output:
Requesting lock on task #72189 [Prune old hits & sessions (includes OPTIMIZE)]
Starting task #72189 [Prune old hits & sessions (includes OPTIMIZE)] at 07:20:01.
PHP Notice: Undefined variable: sessions_rows_affected in /var/www/inc/sessions/model/_hitlist.class.php on line 268
Task finished at 07:20:01 with status: error
Message: [Error code: 100]
STATUS:
T_basedomains: MyISAM - 1497 rows<div class="note">Action #1 Finished. Elapsed time since beginning of task: 0.103 seconds</div>
T_hitlog: MyISAM - 3717 rows<div class="note">Action #2 Finished. Elapsed time since beginning of task: 0.103 seconds</div>
T_sessions: MyISAM - 8282 rows<div class="note">Action #3 Finished. Elapsed time since beginning of task: 0.103 seconds</div>
T_track__goalhit: MyISAM - 0 rows<div class="note">Action #4 Finished. Elapsed time since beginning of task: 0.103 seconds</div>
AGGREGATING:
Aggregate the rows from T_hitlog to T_hits__aggregate, Execution time: 0.005 seconds<div class="note">Action #5 Finished. Elapsed time since beginning of task: 0.108 seconds</div>
Aggregate the rows from T_track__goalhit to T_track__goalhit_aggregate, Execution time: 0.000 seconds<div class="note">Action #6 Finished. Elapsed time since beginning of task: 0.108 seconds</div>
Aggregate ONLY collection browser sessions from T_hitlog to T_hits__aggregate_sessions, Execution time: 0.003 seconds<div class="note">Action #7 Finished. Elapsed time since beginning of task: 0.111 seconds</div>
Aggregate ONLY collection API sessions from T_hitlog to T_hits__aggregate_sessions, Execution time: 0.001 seconds<div class="note">Action #8 Finished. Elapsed time since beginning of task: 0.112 seconds</div>
Aggregate ALL browser sessions from T_hitlog to T_hits__aggregate_sessions, Execution time: 0.002 seconds<div class="note">Action #9 Finished. Elapsed time since beginning of task: 0.114 seconds</div>
Aggregate ALL API sessions from T_hitlog to T_hits__aggregate_sessions, Execution time: 0.001 seconds<div class="note">Action #10 Finished. Elapsed time since beginning of task: 0.115 seconds</div>
PRUNING:
0 rows from T_track__goalhit, Execution time: 0.000 seconds<div class="note">Action #11 Finished. Elapsed time since beginning of task: 0.115 seconds</div>
0 rows from T_hitlog, Execution time: 0.002 seconds<div class="note">Action #12 Finished. Elapsed time since beginning of task: 0.117 seconds</div>
1000 rows from T_sessions, Execution time: 0.018 seconds<div class="note">Action #13 Finished. Elapsed time since beginning of task: 0.135 seconds</div>
262 rows from T_sessions, Execution time: 0.037 seconds<div class="note">Action #14 Finished. Elapsed time since beginning of task: 0.173 seconds</div>
Total 1262 rows from T_sessions, Execution time: 0.056 seconds<div class="note">Action #15 Finished. Elapsed time since beginning of task: 0.173 seconds</div>
0 rows from T_basedomains, Execution time: 0.005 seconds<div class="note">Action #16 Finished. Elapsed time since beginning of task: 0.178 seconds</div>
OPTIMIZING:
T_hitlog: 0.017 seconds<div class="note">Action #17 Finished. Elapsed time since beginning of task: 0.196 seconds</div>
T_track__goalhit: 0.000 seconds<div class="note">Action #18 Finished. Elapsed time since beginning of task: 0.196 seconds</div>
T_sessions: 0.010 seconds<div class="note">Action #19 Finished. Elapsed time since beginning of task: 0.206 seconds</div>
T_basedomains: 0.000 seconds<div class="note">Action #20 Finished. Elapsed time since beginning of task: 0.206 seconds</div>
Is the error from the "PHP Notice: Undefined variable: sessions_rows_affected in /var/www/inc/sessions/model/_hitlist.class.php on line 268"?
Have changed $sessions_rows_affected to $sessions_rows_affected_i. Not entirely sure if that's the right thing to do or not but guess will find out when this task is next executed (24 hours from now)
3 amoun Jan 29, 2021 11:19
@agent_kith "If I remember correctly there is supposed to be some bar chart when I'm in Analytics Hits Summary?"
Referring to your last query is it as described in
https://forums.b2evolution.net/7-2-2-analytics-global-hits-summary
4 nanahuatl Jul 16, 2021 23:04
@agent_kith wrote earlier:
...
Have changed $sessions_rows_affected to $sessions_rows_affected_i. Not entirely sure if that's the right thing to do or not but guess will find out when this task is next executed (24 hours from now)
whereas be2evo user @ djkimmb2e
< https://forums.b2evolution.net/v7-2-2-prune-old-hits-undefined-variable >
changed $sessions_rows_affected to $sessions_rows_affected_total
It is an either/or PHilosoPhical predicament... 'a la' Søren Kierkegaard ;-)
@agent_kith wrote earlier:
This appears to do the trick. Logs are still pruned, but now I'm not getting any email notifications about errors now.
Hope this will be fixed in the next update?
Great work on 7.2.2 btw (And 7.x series in general). Love the new features which I've only recently discovered (e.g. content blocks, etc).
But noticed a problem while I'm trouble shooting this Prune logs tasks. If I remember correctly there is supposed to be some bar chart when I'm in Analytics Hits Summary? I now see a blank space, with a table of hits summary by day. Is the graph broken or my setup issue? (This missing graph is happening on my blog and one that I set up for a client).