PostgresReplicationConnection - Unexpected exception while performing keepalive status update on the replication stream

23 views
Skip to first unread message

Zach Cox

unread,
Oct 8, 2025, 2:28:49 PM (14 days ago) Oct 8
to debezium
Hi - we are upgrading a service that uses debezium-embedded and debezium-connector-postgres from 3.1.3 to 3.3.0 and now see the following error logged once during startup:

java.lang.InterruptedException: sleep interrupted
 at java.base/java.lang.Thread.sleep(Native Method)
 at io.debezium.util.Metronome$1.pause(Metronome.java:57)
 at io.debezium.connector.postgresql.connection.PostgresReplicationConnection$1.lambda$startKeepAlive$0(PostgresReplicationConnection.java:1007)
 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
 at java.base/java.lang.Thread.run(Thread.java:840)

The service does appear to start up correctly, and to continue functioning correctly (ie reading rows from Postgres WAL and writing records to Kafka). 

I just want to make sure that seeing this exception in logs is not an indication of an actual problem that we need to address.

I did find this other thread with the same exception. If it's related, we are using snapshot.mode=no_data. 

If it helps, here are logs around the exception:

2025-10-08 12:02:15.015 [debezium-postgresconnector-settings-change-event-source-coordinator] INFO  io.debezium.util.Threads - Requested thread factory for component PostgresConnector, id = settings named = keep-alive
2025-10-08 12:02:15.015 [debezium-postgresconnector-settings-change-event-source-coordinator] INFO  io.debezium.util.Threads - Creating thread debezium-postgresconnector-settings-keep-alive
2025-10-08 12:02:15.016 [debezium-postgresconnector-settings-change-event-source-coordinator] INFO  i.d.c.p.PostgresStreamingChangeEventSource - Searching for WAL resume position
2025-10-08 12:02:15.017 [debezium-postgresconnector-settings-change-event-source-coordinator] INFO  i.d.c.p.c.WalPositionLocator - First LSN 'LSN{0/6E86250}' received
2025-10-08 12:02:15.023 [debezium-postgresconnector-settings-change-event-source-coordinator] INFO  i.d.c.p.c.WalPositionLocator - Received COMMIT LSN 'LSN{0/6E862E0}' larger than than last stored commit LSN 'LSN{0/6E86218}'
2025-10-08 12:02:15.023 [debezium-postgresconnector-settings-change-event-source-coordinator] INFO  i.d.c.p.c.WalPositionLocator - Will restart from LSN 'LSN{0/6E86250}' that is start of the first unprocessed transaction
2025-10-08 12:02:15.023 [debezium-postgresconnector-settings-change-event-source-coordinator] INFO  i.d.c.p.PostgresStreamingChangeEventSource - WAL resume position 'LSN{0/6E86250}' discovered
2025-10-08 12:02:15.024 [debezium-postgresconnector-settings-change-event-source-coordinator] INFO  io.debezium.util.Threads - Requested thread factory for component JdbcConnection, id = JdbcConnection named = jdbc-connection-close
2025-10-08 12:02:15.024 [debezium-postgresconnector-settings-change-event-source-coordinator] INFO  io.debezium.util.Threads - Creating thread debezium-jdbcconnection-JdbcConnection-jdbc-connection-close
2025-10-08 12:02:15.026 [debezium-jdbcconnection-JdbcConnection-jdbc-connection-close] INFO  io.debezium.jdbc.JdbcConnection - Connection gracefully closed
2025-10-08 12:02:15.026 [debezium-postgresconnector-settings-change-event-source-coordinator] INFO  io.debezium.util.Threads - Requested thread factory for component JdbcConnection, id = JdbcConnection named = jdbc-connection-close
2025-10-08 12:02:15.026 [debezium-postgresconnector-settings-change-event-source-coordinator] INFO  io.debezium.util.Threads - Creating thread debezium-jdbcconnection-JdbcConnection-jdbc-connection-close
2025-10-08 12:02:15.026 [debezium-jdbcconnection-JdbcConnection-jdbc-connection-close] INFO  io.debezium.jdbc.JdbcConnection - Connection gracefully closed
2025-10-08 12:02:15.024 [debezium-postgresconnector-settings-keep-alive] ERROR i.d.c.p.c.PostgresReplicationConnection - Unexpected exception while performing keepalive status update on the replication stream
java.lang.InterruptedException: sleep interrupted
 at java.base/java.lang.Thread.sleep(Native Method)
 at io.debezium.util.Metronome$1.pause(Metronome.java:57)
 at io.debezium.connector.postgresql.connection.PostgresReplicationConnection$1.lambda$startKeepAlive$0(PostgresReplicationConnection.java:1007)
 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
 at java.base/java.lang.Thread.run(Thread.java:840)
2025-10-08 12:02:15.039 [debezium-postgresconnector-settings-change-event-source-coordinator] INFO  i.d.c.p.c.PostgresReplicationConnection - Initializing PgOutput logical decoder publication
2025-10-08 12:02:15.059 [debezium-postgresconnector-settings-change-event-source-coordinator] INFO  io.debezium.util.Threads - Requested thread factory for component PostgresConnector, id = settings named = keep-alive
2025-10-08 12:02:15.059 [debezium-postgresconnector-settings-change-event-source-coordinator] INFO  io.debezium.util.Threads - Creating thread debezium-postgresconnector-settings-keep-alive
2025-10-08 12:02:15.060 [debezium-postgresconnector-settings-change-event-source-coordinator] INFO  i.d.c.p.PostgresStreamingChangeEventSource - Processing messages
2025-10-08 12:02:15.060 [debezium-postgresconnector-settings-change-event-source-coordinator] INFO  i.d.c.p.c.WalPositionLocator - Message with LSN 'LSN{0/6E86250}' arrived, switching off the filtering

Thanks,
Zach

Mikhail Spirin

unread,
Oct 8, 2025, 4:37:02 PM (14 days ago) Oct 8
to debe...@googlegroups.com
Hi! Thanks to this, it means that I'm not the only one
My connectors are working perfectly, main problem is that I can't snapshot them, other than change mode to always and back. Im on debezium 3.3.0
But I hope this issue will be addressed soon...

NOTICE: This electronic mail message and any files transmitted with it are intended
exclusively for the individual or entity to which it is addressed. The message,
together with any attachment, may contain confidential and/or privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure or distribution
is strictly prohibited. If you have received this message in error, please
immediately advise the sender by reply email and delete all copies.

--
You received this message because you are subscribed to the Google Groups "debezium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debezium+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/debezium/43ecad25-75af-4ec8-99e5-6a53092b29cdn%40googlegroups.com.


--
Kind regards,
Mikhail Spirin

Data Platform Engineer at DeviantArt

Zach Cox

unread,
Oct 8, 2025, 5:05:33 PM (14 days ago) Oct 8
to debezium
Hi Mikhail - thanks for confirming your connectors work correctly (aside from the snapshots).

Based on the logs right before the exception, I'm wondering if something gets closed but its keep-alive isn't shut down properly, and then we see a single interrupt, but then debezium goes on working correctly. If that's the case, it seems like this logged exception is not important. But it would be nice if it did not occur.

Thanks,
Zach
Reply all
Reply to author
Forward
0 new messages