Site down... Unexpected error??????

Permalink
Hello, I got this message this morning... My site down and I don't understand why?

Here's the error message :

An unexpected error occurred.
mysqlt error: [145: Table './ecothent_two/PageStatistics' is marked as crashed and should be repaired] in EXECUTE("insert into PageStatistics (cID, uID, date) values ('129', 0, NOW())")

Does this sounds familiar to anyone?

Thanks for your help

infinityunit
 
infinityunit replied on at Permalink Reply
infinityunit
I went into my cpanel and repaired the said DB... It seems that this fixed things...

I still don't understand why or how this happened and how this was fixed... This bugs me...

Anyone has an explanation?

Thanks
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
It could be that your PageStatistics table has grown a little too large (as it tends to do over time)
I run a mysql query to truncate it occasionally like this:
truncate table PageStatistics;
infinityunit replied on at Permalink Reply
infinityunit
Hello, Looking at the repair report I found this :

ecothent_two.PageStatistics warning: number of rows changed from 143114 to 143086

Could this have anything to do with what happened?

Thanks

P.
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
If you are using the Track Page View Statistics then I am not surprised it is so bloated..
I would truncate it and turn off the Track Page View Statistics unless you really need it.
infinityunit replied on at Permalink Reply
infinityunit
Oh, Ok, this is all so new...

Can you help me to do that... And please explain to me as if I knew nothing... 'cause, in reality, I know very little about this kind of things.


So how can I truncate my db
and where would I turn off the Track page view statistics?

This is a journey into the unknown for me...

Many thanks for your help
ConcreteOwl replied on at Permalink Best Answer Reply
ConcreteOwl
In mysql (the place where you repaired your tables) you should see a SQL page/link where you can run a DB query,
Just paste this code in there and click Go
truncate table PageStatistics;

Just make a backup of the DB first though (just in case)

When you have done that, log into your site and go to system & settings and under SEO & STATISTICS, click on Statistics and untick the Track page view statistics.
infinityunit replied on at Permalink Reply
infinityunit
Hey great, it worked without any complication.

I had a hard time finding where to run the query but I remembered that my server has PHPmyadmin installed, so I fiddled in there and voilà!

Many thanks for your help

Pat.