How to debug/control database connections

We are tracking a handful of pages with modest traffic (less than 1000 visits/day) with a self-hosted instance of motomo. After less than 2 months of operation, we saw a spike in the number of database connections - more than our mysql max_connections setting would allow (90). To avoid blocking other services, we limited the user connections of the matomo user (to 50), but this results in [mpm_prefork:error] [pid 1] AH00161: server reached MaxRequestWorkers setting. In both cases, the matomo server itself is unresponsive (command line access works, but not to the frontend) and after manual restart (of the matomo instance or the underlying apache process), the connections are reset, but after quickly increase until the limit. We are running the instance in a kubernetes cluster using the official image from The database is managed outside the cluster. Not sure if that is somehow related to our problem, but at the moment, I can’t see why.

Now my questions are: Is it normal that matomo requires that many connections with such little traffic? Is there any means to “control” the number of connections from motomo itself?