Too many active concurrent transactions when archiving

Yes: I’m using mysqli.

@cronventis do you use segments?
As I see you would like to use VisitFrequency plugin, you may try to disable the process of segment reports for this VisitFrequency plugin and see if it works better:

This worked.

But does that fix the problem? Or just skip it for me? :wink:

Unfortunately, it just skipped it… But it allows the archiving for VisitFrequency outside segments… It is better than nothing…
If you have several tracked sites, you may just disable the archiving of segments for one or another site (see the last tip of the link I previously provided… Many attempts to try) Then it would archive for all segments of all sites except the one(s) that is the source of problem…

Changing the DB Connector to PDO might help in some cases, so it might be worth trying. There has been some issues when using Mysqli in the past that were resolved by switching to a different connector.

When disabling the segments for the plugin as @heurteph-ei mentioned it skips the processing of segments for that specific plugin (The data for Visit Frequency would not be shown in segment reports).

But this might indicate that there are either a very high number of segments on your instance or that you have some segments that due to their configuration cause very large amounts of processing on the database.

Could you maybe check the number of segments using:
SELECT COUNT(*) FROM matomo_segment;

Other than that you may need to review any segments that have a high number of conditions to see if they can be optimized to reduce the load on the database.

1 Like