@mikeSimonson opened this Pull Request on June 23rd 2017

of the archive cronjob.
This can be helpfull when you approach the memory limit.

@mikeSimonson commented on June 23rd 2017

The build is failing for reason that are unrelated to this PR.
All the tests that this PR broke are fixed.

@mattab commented on August 3rd 2017 Member

Hi @mikeSimonson
Thanks for the PR. Started reviewing it but then realised that this script is not actually the script which runs the archiving tasks. They are either

  1. Run in a separate thread using our console command climulti:request (if supported)
  2. Or they are run by calling the Piwik API over HTTP

In both cases the memory of the archiving script will not raise much as the actual memory hungry processes are in separate threads.

Therefore I would say this PR is not needed. Could you clarify whether it was helpful for you at some point, and why?

@mattab commented on August 16th 2017 Member

@mikeSimonson Please see my last comment for questions. For now closing the PR but happy to re-open if it's actually useful :+1:

@mikeSimonson commented on August 18th 2017

@mattab Sorry I thought I had already replied.

That commands is also directly called by cronjobs ( from the docs ).
It's in this case that it's useful for me as the log will give me more info as to why it might have failed.

@mattab commented on August 27th 2017 Member

@mikeSimonson would you mind sending here an example of the archive log output which shows the memory increase/decrease or another interesting use case? Thanks

@mikeSimonson commented on August 27th 2017
INFO [2017-08-27 22:40:19] Archived website id = 3, period = year, 0 segments, 1495404 visits in last 2 years, 1495404 visits this year, Time elapsed: 45.997s
INFO [2017-08-27 22:40:19] Archived website id = 3, 4 API requests, Time elapsed: 35.564s [3/9 done]
INFO [2017-08-27 22:40:19] Mermory usage: 123.55MB
INFO [2017-08-27 22:40:19] - no new tracking data for website id 4 since 2017-08-27 22:35:11 UTC (since the last successful archiving)
INFO [2017-08-27 22:40:19] Skipped website id 4 as archiving is not needed
This Pull Request was closed on August 16th 2017
Powered by GitHub Issue Mirror