1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Server error Duplicate entry for key 'expiry_date' and site not accessible

Discussion in 'Troubleshooting and Problems' started by Renegade, Sep 4, 2014.

  1. Renegade

    Renegade Well-Known Member

    How to resolve?
  2. Mike

    Mike XenForo Developer Staff Member

    What changes have you made to the site? You have a unique index where there shouldn't be one. It shouldn't just appear automatically though.
  3. Mike

    Mike XenForo Developer Staff Member

    You can recreate xf_session table:
    CREATE TABLE xf_session (
            session_id VARBINARY(32) NOT NULL,
            session_data MEDIUMBLOB NOT NULL,
            expiry_date INT UNSIGNED NOT NULL,
            PRIMARY KEY (session_id),
            KEY expiry_date (expiry_date)
        ) ENGINE = MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
    But it would be important to figure out why it got changed.
  4. Renegade

    Renegade Well-Known Member

    The last change I made was day before when I upgraded to RC2 and then upgraded an add-on. This has been appearing since last one hour on its own.
  5. Renegade

    Renegade Well-Known Member

    Ok I repaired the tables and the site is working again.

    On login I found this in the error logs. This is now the third time xf_session.MYI has had problem in the last one year. Thats why I thought I should first try repairing the tables even before I saw this error log.

  6. Renegade

    Renegade Well-Known Member

    This happened again today. The exact same thing. No changes made to the site since 1.4.1 update :(
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Is MySQL shutting down unexpectedly?

    You may need to ask your host to investigate the server.

Share This Page