Fatal Error When Pulling Up Site

Permalink
I have some Concrete sites hosted on a Virtual Dedicated Server at Godaddy and the server went down. I had them do a reboot of the server and all the sites began working again except for one of them. When I try to pull up the site I get the following error:

Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [1062: Duplicate entry '17732' for key 1] in EXECUTE("insert into PageStatistics (cID, uID, date) values ('1', 0, NOW())") ' in /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/3rdparty/adodb/adodb.inc.php(1042): adodb_throw('mysql', 'EXECUTE', 1062, 'Duplicate entry...', 'insert into Pag...', false, Object(ADODB_mysql)) #1 /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/3rdparty/adodb/adodb.inc.php(998): ADOConnection->_Execute('insert into Pag...') #2 /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/3rdparty/adodb/adodb.inc.php(766): ADOConnection->Execute('insert into Pag...', Array) #3 [internal function]: ADOConnection->Query('insert into Pag...', Array) #4 /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/database.php(73): call_user_func_array(Array, Array) #5 [internal function]: Data in /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php on line 78

 
dwayneparton replied on at Permalink Reply
dwayneparton
This looks like it was the same kind of error.

http://www.concrete5.org/community/forums/chat/adodb_exception-dupl...

That might help you solve this.
dwayneparton replied on at Permalink Best Answer Reply
dwayneparton
I was able to replicate your error. The way I recreated it was to turn off auto increment on the pstID field in the PageStatistics table. This leads me to believe that there is something wrong with that row in your DB and auto increment is reading like the last pstID entered is 17731 when really it is 17732.

I am not to sure that this is the appropriate way to handle this but here is a what I would try.

DELETE FROM PageStatistics WHERE pstID = 17732


I hope that helps.
chestercat replied on at Permalink Reply
Thanks for your help. I ran a repair operation on the table PageStatistics and it fixed the problem.
dwayneparton replied on at Permalink Reply
dwayneparton
Great. That was probably the better solution. :)
Giger replied on at Permalink Reply
Giger
How do I do that?
Can you please give me a step by step explanation?
I'm a graphic designer and can't get most of what you guys write in this forum.
I can't access my dashboard due to this error...
Help please