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.
Options

Fatal Error in Gdn_Database.Query() Duplicate entry 'nnn-nnnnnn' for key 'PRIMARY (vanilla 2.0.18.4)

nfalconenfalcone New
edited March 2013 in Vanilla 2.0 - 2.8

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

Comments

  • Options

    this is the query in error:

    insert GDN_UserDiscussion (UserID, DiscussionID, CountComments, DateLastViewed) values (:UserID, :DiscussionID, :CountComments, :DateLastViewed)

    regards

  • Options

    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.

  • Options

    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

  • Options
    mcu_hqmcu_hq yippie ki-yay ✭✭✭
    edited November 2012

    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.

  • Options

    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.

Sign In or Register to comment.