PostgreSQL 死鎖異常

元亨利貞發表於2024-01-05

錯誤日誌:

 java.lang.Object.wait(Native Method)
org.postgresql.jdbc.PgStatement.killTimerTask(PgStatement.java:981)
org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:838)
org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1556)
com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:128)
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeBatch(HikariProxyPreparedStatement.java)
com.vsoc.realtime.schedule.functions.PostgreSQLSinkFunction.flush(PostgreSQLSinkFunction.java:182)
com.vsoc.realtime.schedule.functions.PostgreSQLSinkFunction.invoke(PostgreSQLSinkFunction.java:114)
org.apache.flink.streaming.api.operators.StreamSink.processElement(StreamSink.java:54)
org.apache.flink.streaming.runtime.tasks.OneInputStreamTask$StreamTaskNetworkOutput.emitRecord(OneInputStreamTask.java:233)
org.apache.flink.streaming.runtime.io.AbstractStreamTaskNetworkInput.processElement(AbstractStreamTaskNetworkInput.java:134)
org.apache.flink.streaming.runtime.io.AbstractStreamTaskNetworkInput.emitNext(AbstractStreamTaskNetworkInput.java:105)
org.apache.flink.streaming.runtime.io.StreamOneInputProcessor.processInput(StreamOneInputProcessor.java:65)
org.apache.flink.streaming.runtime.tasks.StreamTask.processInput(StreamTask.java:496)
org.apache.flink.streaming.runtime.tasks.StreamTask$$Lambda$851/1932393278.runDefaultAction(Unknown Source)
org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.runMailboxLoop(MailboxProcessor.java:203)
org.apache.flink.streaming.runtime.tasks.StreamTask.runMailboxLoop(StreamTask.java:809)
org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:761)
org.apache.flink.runtime.taskmanager.Task$$Lambda$991/947462405.run(Unknown Source)
org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:958)
org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:937)
org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:766)
org.apache.flink.runtime.taskmanager.Task.run(Task.java:575)
java.lang.Thread.run(Thread.java:748)

解決方案:

<dependency>
    <groupId>org.postgresql</groupId>
    <artifactId>postgresql</artifactId>
    <version>42.7.0</version>
</dependency>




來自 “ ITPUB部落格 ” ,連結:https://blog.itpub.net/70024433/viewspace-3002741/,如需轉載,請註明出處,否則將追究法律責任。

相關文章