I was getting strange metrics sometimes, and today I was able to locate the problem in real-time. My site offers PDF documents for download in a section. I had noticed high DOM times (both processing & completion) when visitors downloaded some of those, in the past.
Today, I had one visitor spending almost 2 hours there, browsing that section. The visitor downloaded several PDFs and also printed some articles of that section (not PDF prints, just regular content). I saw the DOM metrics rise very high, reaching almost 40 seconds, and only due to that one visit. The visitor used Chrome 91.0 and Windows 10.
These particular pages load fast, and mostly contain text. In general, this problem of high DOM metrics appears to be associated with visitors who also download. I do not know why, but I happened to witness it today in real-time with only 1 visit.
Visitor info and summary & the metrics of the last days where there was an increase in visitors who downloaded PDFs. The last bar is from today, and is only from one visit - I saw the bar increase from 3.5s to almost 30s and then to 40s.
Matomo version: 4.3.1
PHP version: 7.4.19
Server Operating System: Apache
Hi @MaghSamana, if you were to perform the same actions as this user, would you see the same performance metrics show up in Matomo (in other words, is the problem reliably reproducible)? Can you see what browser, os, internet provider the specific user is using?
The visitor used Chrome 91.0 and Windows 10 (and 1366x768). I haven't added internet provider tracking.
I will try to reproduce this tonight, and get back to you.
After various tests, and with various browsers, the problem of extremely high DOM is certainly tied to Chrome browser v. 91.0.
Both in my tests, and in the visits with excessive DOM (from 20 secs, reaching as high as 80secs the more downloads there are), it was always this particular browser version.
Browsers like Safari, Edge, do not reproduce this. I got partial reproduction with Firefox 89 - high DOM but not as much (10-12secs at most).
I keep seeing these bizarre metrics again and again. Anyway, I sent you an email, and let's see what could be the issue here.
Based on communication w/ @MaghSamana, this is definitely some kind of bug, though I'm still not sure what the cause is. I'll keep looking.
Finding the cause of the issue is proving to be rather difficult. It seems to be due to a single visitor that downloads PDF documents.
The quickest way to solve this would be to add segments for page performance dimensions. This would allow users to ignore values that are greater than a threshold, or find visits with abnormal values to figure out why they are like that. As it is now, it's extremely difficult to find this information, having to query the log tables directly.
👍 We'll look further into it once the issue is scheduled. We'll probably wait first to see if other users are having a similar issue. Possible it's an issue with that Chrome version. For the segments we have an issue here: https://github.com/matomo-org/matomo/issues/10202
And also created https://github.com/matomo-org/matomo/issues/17824