Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Fatal Error in Gdn_Database.Query() Duplicate entry 'nnn-nnnnnn' for key 'PRIMARY (vanilla 2.0.18.4)
nfalcone
New
From several week we are experiencing this error on our big db-forum (>5GB) when you insert new discussion but also when you VIEW an existent discussion!!!
Peraps an error related to the database load? How and where we can inspect this issue?
Regards
Tagged:
0
Comments
this is the query in error:
insert GDN_UserDiscussion (UserID, DiscussionID, CountComments, DateLastViewed) values (:UserID, :DiscussionID, :CountComments, :DateLastViewed)
regards
I think you've probably reached the maximum ID of your discussions table. Check the details of that insert function (debug modus) and let's see which error MySQL will give you.
There was an error rendering this rich post.
tnx for quick response...
one clarification: the error now is occasional and, I repeat, it arise also when i read a discussion...
and one question: the maximum-id problems should happen also when i read a discussion?
regards
If the DB uses INT type for discussion ID, you would run into trouble after (2^(4*8))/2 discussions (2 billion) were made, which is probably not the case.
Ok, so then I'm wrong. That's why I needed the details of that insert query.
The debug modus needs to be turned on anyways.
The duplicate primary key is the key of UserID in combination with DiscussionID. The error says that there is already a record with that exact combination. The only way to find out what's happening is to turn on the debug modus.
The size of the DB is 5GB, that's why I thought the trouble was in the area of the INT field.
There was an error rendering this rich post.