last week there was everything working fine. no changes made. today, stuff is not running fine. piwik in version 0.4.1 does not show useful content anymore. if you ever get to see all your widgets showing the General error 126″ you can start over with mysqlrepair.
General error: 126 Incorrect key file for table ‘/tmp/#sql_6d3c23.MYI’; try to repair it
SQLSTATE[HY000]
Yes sir, we’re going to repair the database totally. To do so, we fire up
mysqlrepair -B piwik -force -p
which will show a lot of OK rows. option -A is for all databases, so if your mysql server is in production and you’ve got a bunch of dbs on it hot, you propably consider using -B option to point to the single piwik database. I had to retry this with different options but now the things looks okay.

so today’s view is fixed, but since the problem existed for around three days, two days of data are corrupted. so i open config/global.ini.php and set the debugsters to 1.
[Debug]
; the archiving process will always be triggered, even if the archive has already been computed
always_archive_data_period = 1;
always_archive_data_day = 1;
; if set to 1, all the SQL queries will be recorded by the profiler
enable_sql_profiler = 1;
after having reprocessed the complete archive, which does take quite a while, there is still a report of an incorrect key file. But now with nice SQL profiling., d’oh.
<?xml version="1.0" encoding="utf-8" ?>
<result>
<error message="SQLSTATE[HY000]: General error: 126 Incorrect key file for table '/tmp/#sql_694e23.MYI'; try to repair it" />
</result>
solution
the problem was caused by a /tmp partition defined too small (16mb on a guest). now as i raised the tmpfs size the system works normal again. in vserver landscapes you can search a while before finding the corresponding fstab in /etc/vservers/yourvserver/fstab on the host. All this can be found in the vserver faq section.
Thanks to @schommr for the tip.
Best of it all, your data won’t be gone if you have a problem like this. It just can’t be processed to show correctly. My concerns about several days loss of data were flushed away when piwik’s archive.sh ran through in about twenty minutes. go piwik!