I'm using Piwik to monitor my website traffic and sending events to track users' behavior. In parallel I constantly withdraw this event data from Piwik using Piwik API.
Every day at 12:00AM Piwik dashboard and api becomes unresponsive for 3 hours. There is an endless DB sql query running on the DB during this time and DB CPU usage surges.
How can I prevent this downtime? I've already implemented all suggested implementations for heavy load sites on Piwik Documentations.
Please enable the Mysql Slow query log in your mysql server. Then create a bug report on the Piwik issue tracker: https://github.com/piwik/piwik/issues/
The Piwik team will answer and help, maybe it's a new issue or maybe there is already a solution. The slow query log will be very useful.