Matomo dashboard login requires database writable

Hi,

We have configured matomo using cloud database having one writer and one reader instance.
We have used one machine for tracking and one for dashboard access .
Now if we connect dashboard to writer database instance , it is executing following queries and it increases the database CPU up to 18-20%

SELECT
count(*) as visits, COUNT(DISTINCT log_visit.idvisitor) as visitors
FROM
piwik_log_visit AS log_visit
WHERE
log_visit.idsite in (‘395’) AND log_visit.visit_last_action_time >= ‘2018-04-04 11:39:12’

To minimize the impact of above queries we connected matomo dashboard to reader instance but now we are getting following error :

SQLSTATE[HY000]: General error: 1290 The MySQL server is running with the --read-only option so it cannot execute this statement

Is it possible to use reader database instance to login to matomo dashboard ?

Thanks

The solution is to schedule cron job. Now when we access dashboard, CPU does not get high because reports are already built .

1 Like