Matomo Makes Burst Connections to MariaDB Causing Deadlock

Hi all, we are using Matomo to track user behaviors.

We have multi Matomo connected to a 1 master 1 slave MariaDB cluster. Both master and Slave IPs are set in Matomo. Queued Tracking is enabled in matomo and we use cronjob for archiving.

We found that sometimes the trackers will create a huge burst of connections. These connections will make our MariaDB act slowly and eventually fall into deadlock. We would like to know if anyone encounter this issues before or knowing the root cause of this problem?