Menu

#257 Duplicate entry for key 'PRIMARY'

3.6.2
open
nobody
mysql (1)
9 - High
2016-05-10
2016-05-10
No

Hi

Suddengly our production server (3.6.8) is randmly refusing to submit new worklfows (VERCE).
Seem the error is related to constraints violaiton in the MySQL tables

We get exceptions like:

  • com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'sync-2612' for key 'PRIMARY'

  • com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'STAGEOUT-2602' for key 'PRIMARY'

Do you have any suggestion to solve this issue on the current version? We can't afford at the moment to migrate this specific instance.

Thanks

Discussion

  • Zoltán Farkas

    Zoltán Farkas - 2016-05-10

    Hi Alessandro,

    Could you please send the full stack trace?
    Thanks,

    Zoltan

     
  • Alessandro Spinuso

    Hi Zoltan

    Below:

    com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'sync-2612' for key 'PRIMARY'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    at com.mysql.jdbc.Util.getInstance(Util.java:381)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2019)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1937)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1922)
    at hu.sztaki.lpds.statistics.db.AbstractJob.insertEntity(AbstractJob.java:67)
    at hu.sztaki.lpds.statistics.db.Entity.testThenInsertEntity(Entity.java:149)
    at hu.sztaki.lpds.statistics.db.Sorter.put(Sorter.java:232)
    at hu.sztaki.lpds.statistics.db.stataggregate.runAgg(stataggregate.java:119)
    at hu.sztaki.lpds.statistics.db.stataggregate.run(stataggregate.java:53)
    at java.lang.Thread.run(Thread.java:745)

     

Log in to post a comment.

MongoDB Logo MongoDB