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
Segment archiving for "Year" period takes very long for new or edited segments #18524
Comments
For more info:
|
@Starker3 I've done a few tests, but haven't managed to recreate this. Any chance of seeing the console command you used for archiving? Did you have development mode enabled for the tests? |
@bx80 I just used The archive logs attached were from I did some testing with a different Site ID that has generated visit data and did not see the issue, so I was thinking that it might be specific to sites that have visits over a long period of time, eg. at least one visit for each day over the last year? Otherwise I can setup an account for you on the Matomo site and setup SSH access if that might help. |
I ran the archiving queries again to get debug information, all of the previous queries were run as follows: This is what shows in the running processes when its processing the
last93-archive-debug.log I enabled development mode like you mentioned to see if that would get us more info. This is the archive run with debug output but it seems the output file is too large to upload to GitHub in a comment. I managed to grab the following query close to the end of the archiving with development mode enabled:
So I performed the archiving tests again to see if I could grab more of the queries that were being executed sort of in the middle of the
|
btw you will also want to paste any other config ini setting in here, especially from the |
Sure @tsteur Here is the
I don't have a [Debug] section in my config.ini.php |
I retested this on 5.0.0 to see if the issue remains. It does indeed still seem to be happening for the I managed to also capture some of the queries on the database directly which seem to indicate that for some reason the archiver is processing individual day periods that are part of the year period in order to generate the year period report. In the queries below the log you'll see dates in queries that were not processed according to the core:archive logs.
SQL queries that were captured during the long pause for the year period:
|
Thanks for the follow up @Starker3 , it sounds like we need some more investigation of this behavior on the 5.x codebase. I've tagged this issue as performance related and assigned it for prioritization. We're focusing on performance issues at the moment and this might be a good one to look at (@Stan-vw) |
We tried recreating this but couldn't, so we're closing it for now. Please reopen in case you still have this issue. |
While troubleshooting an issue with segment archiving, I noticed that "Year" periods for newly created or recently edited segments take extremely long to process when compared to the time it takes the "Month" periods to process.
(A few seconds for "Month" periods vs almost 30 minutes for "Year" period)
In this example I created a simple test segment where I set the condition to
Action Type is pageviews
withprocess_new_segments_from = "editLast93"
in the config file.In the core:archive output it shows that the correct dates are being processed and everything seems fine for the month periods:
But when it comes to the "Year" period it takes an exceptionally long time when compared to the "Month" periods which all took only a few seconds:
While trying to reproduce the issue I I noticed that it didn't happen when creating a segment with the same conditions as previously processed (I.e. a duplicate segment), but creating a new segment with a different definition results in the same issue when using editLastN or lastN in the config file.
Here are two archive logs, first with
process_new_segments_from = "editLast93"
in the config.ini.phpeditLast93-archive.log
Second with
process_new_segments_from = "last93"
in the config.ini.phplast93-archive.log
Both of the above archive runs took only a few seconds to process the "Month" periods for these newly created segments
The text was updated successfully, but these errors were encountered: