3 Replies Latest reply on Oct 26, 2009 11:22 PM by Yong Hao Gao

    unique constraint

    Tom Eicher Newbie

      Hello folks,

      we've been using ESB 4.5 in production for a while, and now and then
      (mostly when under heavy load) I find the following message with
      a JBM stack trace in the
      server.log:
      2009-10-22 03:19:17,479 WARN [WorkerThread#0[172.17.129.178:34800]] : [] / [org.jboss.messaging.core.impl.JDBCSupport] SQLException caught, SQLState 23505 code:0- assuming deadlock detected, try:1
      org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "jbm_msg_ref_pkey"

      Obviously, we're using Postgres persistence.
      ESB 4.5 (and the new 4.6) comes with JBM 1.4.0sp3, but we've
      had to patche ESB to use 1.4.4ga
      (see: https://jira.jboss.org/jira/browse/JBESB-2902 )

      This happens mostly daily, mostly with "try:1" and no followup errors,
      but sometimes I also see a "try:2" and even less often bigger tries.

      -> Do you think this is (could be) causing data loss ?

      -> Does "try:1" with no followup errors mean that a retry worked ?

      -> Any idea how to further debug or get logging for that issue ?

      -> I do not see how I could be causing anything like this from our
      code, so this is most probably a bug in the ESB ?
      Should I file a bug ?

      Thanks and Cheers,
      Tom.

      2009-10-21 18:25:09,152 WARN [WorkerThread#1[172.17.129.178:56983]] : [] / [org.jboss.messaging.core.impl.JDBCSupport] SQLException caught, SQLState 23505 code:0- assuming deadlock detected, try:1
      org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "jbm_msg_ref_pkey"
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1608)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1343)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:194)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:304)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:365)
      at org.jboss.messaging.core.impl.JDBCPersistenceManager$1AddReferenceRunner.doTransaction(JDBCPersistenceManager.java:1304)
      at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.execute(JDBCSupport.java:465)
      at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.executeWithRetry(JDBCSupport.java:503)
      at org.jboss.messaging.core.impl.JDBCPersistenceManager.addReference(JDBCPersistenceManager.java:1353)
      at org.jboss.messaging.core.impl.ChannelSupport.handle(ChannelSupport.java:226)
      at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.routeInternal(MessagingPostOffice.java:2203)
      at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.route(MessagingPostOffice.java:489)
      at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendMessage(ServerConnectionEndpoint.java:741)
      at org.jboss.jms.server.endpoint.ServerSessionEndpoint.send(ServerSessionEndpoint.java:383)
      at org.jboss.jms.server.endpoint.advised.SessionAdvised.org$jboss$jms$server$endpoint$advised$SessionAdvised$send$aop(SessionAdvised.java:87)
      at org.jboss.jms.server.endpoint.advised.SessionAdvised$send_7280680627620114891.invokeNext(SessionAdvised$send_7280680627620114891.java)
      at org.jboss.jms.server.container.SecurityAspect.handleSend(SecurityAspect.java:157)
      at sun.reflect.GeneratedMethodAccessor189.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
      at org.jboss.jms.server.endpoint.advised.SessionAdvised$send_7280680627620114891.invokeNext(SessionAdvised$send_7280680627620114891.java)
      at org.jboss.jms.server.endpoint.advised.SessionAdvised.send(SessionAdvised.java)
      at org.jboss.jms.wireformat.SessionSendRequest.serverInvoke(SessionSendRequest.java:95)
      at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:608)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:420)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)
      2009-10-21 18:25:09,153 WARN [WorkerThread#1[172.17.129.178:56983]] : [] / [org.jboss.messaging.core.impl.JDBCSupport] Trying again after a pause