Matomo 4.6.2(Tracking HTTP API) load test causing high aws rds cpu and high connections


We are using matomo(piwik) since 8 years and it has been working fine and on average getting 4M hits daily and in peak up to 8M. Thanks to matomo and community .Since then we used to load test our underlying system so that we know what could be max throughput . Now we are facing following:

Currently we are using Matomo 3.13.6. We have load tested(Tracking HTTP API) using Visual Studio for 50 constant users and found the following:

AWS RDS cpu: < 40%
DB connections: < 11
Hits per second: 286

We are trying to setup a new version with Matomo 4.6.2 and finding the following:

AWS RDS cpu: ~ 100%
DB connections: 50
Hits per second: 26
High memory usage

This is a huge discrepency and I feel like we are missing something. We have tried disabling our location database lookup so it isn’t related to that. Both databases were running MySQL 5.7 and both had the same PHP version of 7.3

Perhaps we have missed a configuration step, can you advise?


This helped us to achieve the performance :

Thanks to matomo and community :slight_smile: