Yearly archives stuck

I keep having archive processes that run for a long time (sometimes hundreds of hours) before I finally have to kill them or restart the server.

At the moment, I have three archive processes running:
siteid 2, yearly for 2021-01-01, running for 15 hours
siteid 1, yearly for 2020-01-01, running for 13 hours
siteid 2, monthly for 2020-12-01, running for 5 minutes

What should I do to diagnose this issue?

Platform

Matomo

  • v4.2.1
  • Never deleting old raw data
  • Never deleting old aggregated report data
  • Cron archive once per hour

PHP

  • v7.3
  • cli memory_limit => -1

FWIW site 1 gets 500k pageviews / year, and site 2 gets 2.5 million pageviews / year.

After a bit more digging, I’m finding that the reports that are getting stuck are always custom report archives. My suspicion is that I created a new custom report (with campaign name & keyword as dimensions, visits and bounce rate as metrics, if that matters), and then invalidated data that caused yearly archives to be run in a year where the report didn’t exist.

That’s my theory at the moment. If anyone has had similar experience, let me know. Since this involves custom reports, I’ve sent an email to shop@innocraft.com.