Scheduled PDF Reports very slow when thousands of websites in Piwik
|Reported by:||Cyril||Owned by:|
My Piwik installation has around 15000 sites and users. Calling the tracker took around 70ms in 1.0 (I test in command line, using curl). After upgrading to 1.1.1, the very same request takes nearly 800ms.
I have both my 1.0 and 1.1.1 installations in parallel (using the same database, same config file), so it's perfecty reproductible.
I've tried disabling the Live plugin, it doesn't change anything.
I've enabled the slow query log; my 1.0 install has zero slow query, the 1.1.1 has this one:
SELECT * FROM piwik_site WHERE idsite IN (1, 63, 64, 65, 66, 67, 68, 69, 70, 71, ...)
(thousands of IDs). This query isn't that slow (0.07), but I suspect Piwik 1.1.1, for some reason, iterates over all sites to do something.
MySQL CPU usage has increased x3, PHP processes are using 100% CPU, so PHP is definitely the limiting factor.
Change History (10)
comment:9 Changed 3 years ago by JulienM (JulienMoumne)
- Resolution set to fixed
- Status changed from new to closed