[2021-08-26 08:05:10:365] [WARNING ] [ in_4-message-archive ] JDBCMessageArchiveRepository.archiveMessage(): Problem adding new entry to DB: <message xmlns="jabber:client" id="11907" to="ellanj@sure.im" from="ELLANJ@tigase.im/陈小敏的iPhone" type="error"><event xmlns="http://jabber.org/protocol/pubsub#event"><items node="eu.siacs.conversations.axolotl.devicelist"><item id="current"><list xmlns="eu.siacs.conversations.axolotl"><device id="94238654"/></list></item></items></event><delay xmlns="urn:xmpp:delay" stamp="2021-08-26T08:03:46.912Z" from="tigase.im"/><error type="wait" code="404"><recipient-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">The recipient is no longer available.</text></error></message>
com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:123)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:955)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1094)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1042)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1345)
at com.mysql.cj.jdbc.CallableStatement.executeLargeUpdate(CallableStatement.java:2526)
at com.mysql.cj.jdbc.CallableStatement.executeUpdate(CallableStatement.java:896)
at jdk.internal.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at tigase.db.jdbc.PreparedStatementInvocationHandler.invoke(PreparedStatementInvocationHandler.java:38)
at com.sun.proxy.$Proxy34.executeUpdate(Unknown Source)
at tigase.archive.db.JDBCMessageArchiveRepository.archiveMessage(JDBCMessageArchiveRepository.java:326)
at tigase.archive.db.JDBCMessageArchiveRepository.archiveMessage(JDBCMessageArchiveRepository.java:50)
at tigase.archive.db.AbstractMessageArchiveRepository.archiveMessage(AbstractMessageArchiveRepository.java:103)
at tigase.archive.db.JDBCMessageArchiveRepository.archiveMessage(JDBCMessageArchiveRepository.java:122)
at jdk.internal.reflect.GeneratedMethodAccessor94.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at tigase.stats.StatisticsInvocationHandler.invoke(StatisticsInvocationHandler.java:75)
at com.sun.proxy.$Proxy53.archiveMessage(Unknown Source)
at tigase.archive.db.MessageArchiveRepositoryPool.archiveMessage(MessageArchiveRepositoryPool.java:66)
at tigase.archive.modules.ArchivingModule.process(ArchivingModule.java:101)
at tigase.component.modules.StanzaProcessor.execute(StanzaProcessor.java:214)
at tigase.component.modules.StanzaProcessor.process(StanzaProcessor.java:201)
at tigase.component.modules.StanzaProcessor.processPacket(StanzaProcessor.java:103)
at tigase.component.AbstractKernelBasedComponent.processPacket(AbstractKernelBasedComponent.java:81)
at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1404)
We should consider replacing functions with procedures as we did in PubSub to fix this issue.
Andrzej Wójcik (Tigase) commented 3 years ago
Changes, the same as in PubSub, were applied to MA and UA schemas.
Deadlock on inserting message:
We should consider replacing functions with procedures as we did in PubSub to fix this issue.