Matomo ECS memory leak and RDS high CPU utilization

I have Matomo deployed in AWS ECS (matomo:4.15.1). It is connected to RDS MariaDB (mariadb:10.6).

Using the mysql CLI, when I run commands like SHOW PROCESSLIST; and SELECT * FROM INFORMATION_SCHEMA.INNODB_TRX order by trx_started limit 10; I see a lot of matomo queries. Some seem to be running for more than 2 days.

The container’s memory seems to be going up non-stop until it’s OOM killed. Database CPU utilization and connections are also very high. For example (sorry, can only post one image since I’m a new user):

I would like some help understanding the problem.

Hi @doublethink
I think this depends on the number of actions you are tracking. What is the volume?
Peaks and holes seem to come from data archiving, as they are periodic on the month… I think the unique visitor processing is defined on the month, isn’t it?

What is the volume?

This is what I get by opening the All Websites page using the today filter:

All Websites dashboard (Total: 868 visits, 4,272 pageviews, 12,500 actions, 0 revenue)

I think the unique visitor processing is defined on the month, isn’t it?

How do I find this?

Hi @doublethink

Your volume is not high…
Maybe a great number of plugins or dimensions could impact negatively performances…? Do you also process data for any kind of time range?

Looking more precisely your graphs, I don’t understand you can use… 176% of CPU!

great number of plugins

49 are active. Would a list help?

dimensions could impact negatively performances

Do you mean custom dimensions? We have one for visit and one for action

Looking more precisely your graphs, I don’t understand you can use… 176% of CPU!

Matomo is a container that runs on ECS. We have a CPU limit, but CPU limits are not strictly enforced if there is CPU available in the host

I think the unique visitor processing is defined on the month, isn’t it?

I don’t think I have configured this, so I must be using the defaults.

Hi @doublethink
As you use virtual resources, can you confirm they are configured as Matomo advises?