debezium / debezium/dbz

Got an invalid memory alloc issue when Debezium Server connected to Postgres. [DBZ-9363]

Open
#84 0 comments 0 reactions 0 assignees View on GitHub
component/postgresql-connector migrated-from-jira type/bug
Dominant language
HTML
Stars
6
Forks
8
Avg merge
2d 19h
Merged PRs (30d)
1

Description

Migrated from [DBZ-9363](https://issues.redhat.com/browse/DBZ-9363)

In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.
h1. Bug report

For bug reports, provide this information, please:
h2. What Debezium connector do you use and what version?

v3.1.2.Final
h2. What is the connector configuration?

 
h2. What is the captured database version and mode of deployment?

PostgreSQL 15.13
cloud managed services
h2. What behavior do you expect?

My expectation is that Debezium Server runs normally and does not enter a restart loop when encountering errors
h2. What behavior do you see?

Jul 14 05:44:48 db-ex bash[3983619]: 2025-07-14 05:44:48,757 INFO  [io.deb.emb.asy.RetryingCallable] (pool-8-thread-1) Failed with retriable exception, will retry later; attempt #11787 out of infinity: org.apache.kafka.connect.errors.RetriableException: An exception occurred in the change event producer. This connector will be restarted.
Jul 14 05:44:48 db-ex bash[3983619]:         at io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:63)
Jul 14 05:44:48 db-ex bash[3983619]:         at io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.execute(PostgresStreamingChangeEventSource.java:190)
Jul 14 05:44:48 db-ex bash[3983619]:         at io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.execute(PostgresStreamingChangeEventSource.java:42)
Jul 14 05:44:48 db-ex bash[3983619]:         at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:322)
Jul 14 05:44:48 db-ex bash[3983619]:         at io.debezium.pipeline.ChangeEventSourceCoordinator.executeChangeEventSources(ChangeEventSourceCoordinator.java:203)
Jul 14 05:44:48 db-ex bash[3983619]:         at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:143)
Jul 14 05:44:48 db-ex bash[3983619]:         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
Jul 14 05:44:48 db-ex bash[3983619]:         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
Jul 14 05:44:48 db-ex bash[3983619]:         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
Jul 14 05:44:48 db-ex bash[3983619]:         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
Jul 14 05:44:48 db-ex bash[3983619]:         at java.base/java.lang.Thread.run(Thread.java:1583)
Jul 14 05:44:48 db-ex bash[3983619]: Caused by: org.postgresql.util.PSQLException: ERROR: invalid memory alloc request size 1562744496
h2. Do you see the same behaviour using the latest released Debezium version?

(Ideally, also verify with latest Alpha/Beta/CR version)

h2. Do you have the connector logs, ideally from start till finish?

I am not sure, as Debezium started up normally at first, but during operation an ‘invalid memory alloc’ error was encountered.
h2. How to reproduce the issue using our [tutorial|https://github.com/debezium/debezium-examples/tree/main/tutorial] deployment?

h1. Feature request or enhancement

For feature requests or enhancements, provide this information, please:
h2. Which use case/requirement will be addressed by the proposed feature?

h2. Implementation ideas (optional)

Contributor guide

Open the contributing guide

Research direction

Start with the supplied stack trace and trace the failure through PostgresStreamingChangeEventSource.java and ErrorHandler.java. Compare the reported PostgreSQL invalid memory allocation with the connector's retry and restart path. Done means the underlying failure is handled without Debezium Server entering the reported restart loop, with a regression test if the relevant test area is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, postgresql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.