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


#1

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


(Matthieu Aubry) #2

In phpMyAdmin or in a MYSQL shell, run



REPAIR TABLE piwik_log_visit;
REPAIR TABLE piwik_log_link_visit_action;



#3

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;


#4

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.


#5

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.


(Olabre) #6

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


(Olabre) #7

sorry, solved.


(Matthieu Aubry) #8

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