No data and Integrity constraint violation


#1

I have a piwik running on a website since 2 month. First all was running fine but now I suddenly realized that there is no data any more since the 15th of march.

All tracking code is correct but even if I call the image tracking image URL in the browser nothing is tracked.

I set debug to true and first thing I realized is, that the tracking image URL has no parameter &rec=1 so the debugger says “GET parameter rec not found in URL, request excluded”, but in the tracking code displayed in the piwik backend there is no rec parameter appended, only idsite=1

When I add the rec parameter in the URL I get an error saying something like:


Error query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '39587' for key 1 In query: INSERT INTO piwik_log_visit ...

I checked the databse with phpmyadmin, it seems to be ok.

Any ideas what I could try or what might have happened?


#2

Ok, I found it: it was the database table. I had to run a repair table and then it worked again.