Table './piwik/piwik_log_visit' is marked as crashed

I’m on Amazon EC2.

My server went down for about an hour this afternoon and in bringing it back up, I had to restore from a backup taken about 3 hours earlier, late in the morning.

When opening up my Piwik dashboard, I see that all widgets with information for today are now broken with the message:

Mysqli prepare error: Table ‘./piwik/piwik_log_visit’ is marked as crashed and last (automatic?) repair failed

And there’s a backtrace with each widget.

If I change the date range to yesterday (April 29), everything in the dashboard works fine except the Visitors in Real Time widget, since it still wants today’s log.

Any ideas?

Thanks

Jacob

In phpMyAdmin or in a MYSQL shell, run



REPAIR TABLE piwik_log_visit;
REPAIR TABLE piwik_log_link_visit_action;


Thanks for pointing me in the right direction.

In the end, it was:


REPAIR TABLE piwik_log_visit;
REPAIR TABLE piwik_log_link_visit_action;

I tried
REPAIR TABLE piwik_log_visit;
REPAIR TABLE piwik_log_link_visit_action;

and mysql reported as repaired but in piwik, i still see the error.

If the db is repaired, maybe it’s just a browser caching issue?

Trying logging out of Piwik, deleting your browser cache and logging back in.

hi, I have the same problem - I tried with a different browser - same issue after repairing the tables.

sorry, solved.

We created a FAQ for this problem: I get the error: Table piwik_log_x is marked as crashed and last (automatic?) repair failed. - Analytics Platform - Matomo