Offset SCN stucks and not proceeding during HIGH Transactions

275 views
Skip to first unread message

Vinoth Kumar

unread,
Nov 3, 2025, 12:45:38 PMNov 3
to debezium
Hello Team,

I'm getting the below error with Oracle 19c database. I've attached the connector config details and shared the analysis sofar.

Can you please assist to move forward.

Error
"Offset SCN 9420122456881 has not changed in 25 mining session iterations. This indicates long running transaction(s) are active.  Commit SCNs {1=9420159644839, 2=9420159644743}."

What we have tried
Verified from the database end that LogMiner is functioning correctly and successfully capturing all archive logs.
Monitored via SUMO Logic, where we noticed that the offset SCN remains stuck even though LogMiner has completed processing those archives.
Restarted the connector multiple times (both manual and automatic restarts) however, it continues to pick up from the same stuck SCN, referring to archives that have already been mined.
The SCN has not moved during such high loads, indicating that the connector offset isn't updating as expected.

Findings
After the data load, streaming stucks with the offset SCN.
This behavior is observed only in PROD, particularly during periods of high transaction volume (30-60G per hour).

Thanks,
Vinoth
Connector-Debezium.txt

Chris Cranford

unread,
Nov 3, 2025, 12:53:33 PMNov 3
to debe...@googlegroups.com
Hi Vinoth -

First and foremost, this message isn't an error but rather just a warning, indicating that you could have a long running transaction present. In a situation where you could have a large batch operation that modifies millions of rows in a single transaction, this can happen until the transaction is completely consumed. But there are some other reasons that are related to bugs. 

What Debezium version are you using, so we can identify whether your issue may be related to a bug?

Thanks,
-cc
--
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/4fae1065-ead8-4811-9d91-2564f53e46fen%40googlegroups.com.

Vinoth Kumar

unread,
Nov 3, 2025, 1:38:32 PMNov 3
to debe...@googlegroups.com
Hi Chris,

First of all thank you for the prompt response!

Yes its a warning but SCN not at all moved for a prolonged window and connector getting either restarted or failed with timeout. In addition, there were no long running sessions at the DB end.

Version: 3.1.3

We have Goldengate running on the same DB server where we don't see any latency issues. Also we stopped Goldengate for a while however Debezium log mining re-read from SCN from where it stuck eventhough those archives were already mined as per DB alert log.

Regards,
Vinoth Kumar
8056-274-822

Chris Cranford

unread,
Nov 3, 2025, 1:43:17 PMNov 3
to debe...@googlegroups.com
Hi Vinoth -

Please update to 3.3.1.Final. There was a bug (DBZ-8747) that could leave transactions in-progress by mistake that were present in versions prior to 3.2.4.Final.  Could you update and see whether you continue to experience any issues with stuck OffsetScn values?

Thanks,
-cc

Vinoth Kumar

unread,
Nov 3, 2025, 1:45:25 PMNov 3
to debe...@googlegroups.com
Hi Chris,

Thanks much !

We will update and keep you informed on this.

Regards,
Vinoth Kumar
8056-274-822

Vinoth Kumar

unread,
Nov 4, 2025, 12:07:18 PMNov 4
to debe...@googlegroups.com
Hi Chris,

We've updated our Debezium to the latest version "3.3.1" and we did a clean initial load.
The large archive/transaction batch starts from 5 AM IST, will monitor and keep you updated 🤞
--
Regards,
Vinoth Kumar
8056-274-822

Vinoth Kumar

unread,
Nov 5, 2025, 9:21:28 AMNov 5
to debe...@googlegroups.com
Hi Chris,
Post the Debezium update, Please see the below updates.

Before Debezium Update to 3.3.1

Monitored via SUMO Logic, where we noticed that the offset SCN remains stuck even though LogMiner has completed processing those archives.
Restarted the connector multiple times (both manual and automatic restarts) however, it continues to pick up from the same stuck SCN, referring to archives that have already been mined.

After Debezium Update to 3.3.1

Stuck SCN:"9420755786214" - Archives "Thread1=767758 & Thread2=526103" --> 7:12 AM IST
Detected possible SCN gap: But SCN is moving ahead - startSCNupperBounds SCN, startSCN 9420786218992, prevEndSCN 9420786218997  - Archives "Thread1=767958 & Thread2=526165" --> 9:04 AM IST
During shutdown SCN:Offsets as shutdown: OracleOffsetContext [scn=9420796942649, txId=46000300bc3d0a00, txSeq=1, commit_scn=[\"9420797074942:1:38000900f8231000\",\"9420797028473:2:18000100e3eb1800\"], lcr_position=null]"
Here "9420796942649" - Archives "Thread1=768027 & Thread2=526188"   --> 11:07 AM IST
Post Restart:  Got the below message
No latest table SCN could be resolved, defaulting to current SCN 
Event with `MISSING_SCN` operation found with SCN 9420801068798 (Archives Thread1=768167 & Thread2=526233)

Here SCN is moved far ahead instead of picking from where it left. Is this expected ? Please let me know your valuable thoughts.

Note: In the current connector I kept only a small set of tables where there won't be many transactions, however the bigger tables which generate more transactions are yet to be onboarded.

Thanks,
Vinoth

Vinoth Kumar

unread,
Nov 5, 2025, 7:02:25 PMNov 5
to debe...@googlegroups.com
Hi Chris/Community Team,

Can you please help and assist me on the below ask.

Regards,
Vinoth Kumar
8056-274-822

Chris Cranford

unread,
Nov 6, 2025, 5:56:52 AMNov 6
to debe...@googlegroups.com
Hi Vinoth -

The "No latest table SCN could be resolved" happens only at one point in time, which is during the snapshot, which itself explains why the connector did not resume from where it left off at shutdown. As to why that happened is what we need to understand.  Did you delete the offsets and history topic, or is your snapshot.mode set to `when_needed`?  What is your connector configuration? 

Thanks,
-cc

Vinoth Kumar

unread,
Nov 6, 2025, 7:26:39 AMNov 6
to debe...@googlegroups.com
Hi Chris,

We haven't deleted anything.
Initially we had a small set of tables with "snapshot.mode: initial" and once the snapshot was completed then after sometime we stopped the connector and added the below snapshot mode. This is to add new tables when we perform Incremental load via Signal Table. We've followed a similar practice in other DBs where we don't see such messages.
 
    snapshot.mode: configuration_based
    snapshot.mode.configuration.based.snapshot.schema: true
    snapshot.mode.configuration.based.snapshot.data

Note: Small sets of tables won't have many transactions, however the newly added tables are bigger which generate more transactions and yet to be onboarded.


Vinoth Kumar

unread,
Nov 6, 2025, 7:35:29 AMNov 6
to debe...@googlegroups.com
Hi Chris,

I mean, did this post the completion of initial snapshot.
#commented
"snapshot.mode: initial"
Added

  snapshot.mode: configuration_based
    snapshot.mode.configuration.based.snapshot.schema: true
    snapshot.mode.configuration.based.snapshot.data

Chris Cranford

unread,
Nov 6, 2025, 9:02:15 AMNov 6
to debe...@googlegroups.com
Hi -

If you have set the following

    "snapshot.mode.configuration.based.snapshot.schema": "true",
    "snapshot.mode.configuration.based.snapshot.data": "true"

Then you have effectively told Debezium to use
    
    "snapshot.mode": "always"

This explains your circumstance.

Thanks,
-cc

Vinoth Kumar

unread,
Nov 6, 2025, 10:57:42 AMNov 6
to debe...@googlegroups.com
Hi Chris,

Apologize, my bad for the typo.
Actually enabled CDC and disabled initial load to have Incremental load via signal for the new tables.
Worrying whether it is data loss or expected because transactions of those big tables were not in the replication list.

     snapshot.mode: configuration_based
    snapshot.mode.configuration.based.snapshot.schema: true
    snapshot.mode.configuration.based.snapshot.data: false
    snapshot.mode.configuration.based.start.stream: true

Thanks,
Vinoth

Chris Cranford

unread,
Nov 11, 2025, 10:14:58 PMNov 11
to debe...@googlegroups.com
Hi Vinoth -

If a user performs a large transaction or if there is a period of many transactions, it's very plausible that you could see the OffsetScn plateau and not change for a period of time. This can be due to the connector waiting for data to be returned by Oracle, we're actively processing a large batch of data, or if there is an in-flight transaction that has not yet committed or rolled back.

I always suggest to folks to look at the broader picture of the connector, checking other JMX metrics to see whether or not they're updating periodically. Do you see the FetchQueryCount incrementing, or the TotalCapturedDmlCount or TotalProcessedRows increasing? These are signs that the connector is operating and consuming data. 

In the JMX metrics, what is the value of OffsetScn, OldestScn, CommittedScn, and CurrentScn ?

-cc

Vinoth Kumar

unread,
Nov 12, 2025, 5:24:11 AMNov 12
to debe...@googlegroups.com
Hi Chris,

We've captured these logs from Sumologic and we do see these SCN values keep changing during offset scn or SCN gap so which means streaming continues as usual without hiccups, Correct If I'm wrong?
I've also asked the Infra team to share the JMX metric info for reference.

@timestamp
:"2025-11-12T07:44:03.842Z  "Offset SCN 9421572168715 has not changed in 25 mining session iterations. This indicates long running transaction(s) are active. Commit SCNs {1=9421573925565, 2=9421573925272}."

@timestamp:"2025-11-12T03:34:10.947Z" "Detected possible SCN gap, using upperBounds SCN, startSCN 9421562666535, prevEndSCN 9421562667455, timestamp 2025-11-11T19:34:03Z, upperBounds SCN 9421565658898 timestamp 2025-11-11T19:34:09Z."  

@timestamp:"2025-11-12T02:02:05.173Z" "Offset SCN 9421534993086 has not changed in 25 mining session iterations. This indicates long running transaction(s) are active. Commit SCNs {1=9421535001588, 2=9421535001572}."

Chris Cranford

unread,
Nov 12, 2025, 10:02:17 AMNov 12
to debe...@googlegroups.com
That's correct, so I would say this is the classic pattern where you have a batch job that generates a substantial amount of redo in a small window, that triggers the connector to panic there could be an issue. The defaults for this check is quite conservative to work best for lower activity environments. I would recommend that you customize the defaults to see if it would help minimize the frequency of this warning.
  1. Change log.mining.scn.gap.detection.gap.size.min from 1 million to perhaps 2 or 5 million.
  2. Change log.mining.scn.gap.detection.time.interval.max.ms from 20000 (20 seconds) to 10000 (10 seconds)

So right now the connector looks to see if within a 20 second window does the SCN grow by 1 million. By reducing the time window and increasing the gap, you reduce the frequency.

As I think this often raises more questions/concerns than being helpful to the community, I've logged DBZ-9672 and intend to likely remove the behavior entirely in Debezium 3.4.

Thanks,
-cc

Vinoth Kumar

unread,
Nov 12, 2025, 10:04:58 AMNov 12
to debe...@googlegroups.com
Hi Chris,

Great, thanks much for the excellent support !

Sure, will plan and modify the default settings to supress these messaga in the logs.

Regards,
Vinoth Kumar
8056-274-822

Vinoth Kumar

unread,
Dec 2, 2025, 2:12:17 AMDec 2
to debezium
Hi Chris/Team,

Hope it is good to follow-up on the existing thread as we similar pattern with slight difference.

We do see LOGMINER StartScn remains same for a longer and EndScn keeps changing however it progress very slow (Almost 8hrs StartScn didn't changed yet). We have ample of free memory available in Streams Pool. In addition we have GoldenGate configured where we don't see any Latency.

Could you please help to boost the performance of these connectors.

Note: Onboarded 500+ tables. 1st connector  - 480 tables and table size is small, 2nd Connector - 15 tables which has huge LOBs and rest all 3 connectors has not more than 3-5 tables which are either BIG in size or some tables don't have PK/Unique key.

Debezium version: 3.3.1 
Connector Info:
    #Debezium Engine/Queing Settings
    max.batch.size: 8192
    max.queue.size: 65536
    max.queue.size.in.bytes: 536870912  #512MB
    log.mining.query.filter.mode: in

topic.prefix: BCPROD
    topic.creation.enable: true
    topic.creation.default.replication.factor: -1
    topic.creation.default.partitions: -1
    topic.creation.default.retention.ms: 1209600000
    schema.include.list: APPNAME,DBZUSER
    table.include.list: APPNAME.TABLE1,APPNAME.TABLE2,DBZUSER.HEARTBEAT,DBZUSER.SIGNAL

log.mining.batch.size.default: 60000
    log.mining.batch.size.max: 1000000
    log.mining.batch.size.min: 10000
    log.mining.scn.gap.detection.gap.size.min: 1000000      # 1 million SCNs
    log.mining.scn.gap.detection.time.interval.max.ms: 10000 # 10 seconds

    #Special character
    field.name.adjustment.mode: avro
    #BLOB, RAW  
    binary.handling.mode: base64

Sumo Logic:
Offset SCN 9423036857229 has not changed in 25 mining session iterations. This indicates long running transaction(s) are active. Commit SCNs {1=9423062374267, 2=9423062373495}."

DB ALERT LOG
LOGMINER: Summary for session 2164177921, OS id 374401
LOGMINER: StartScn: 9423036857229 (0x00000891f8c3bb8d)
LOGMINER: EndScn: 9423069174443 (0x00000891fab0daab)
LOGMINER: HighConsumedScn: 0
LOGMINER: PSR flags: 0x0
LOGMINER: Session Flags: 0x4000441
LOGMINER: Session Flags2: 0x400
LOGMINER: Read buffers: 4
LOGMINER: Region Queue size: 256
LOGMINER: Redo Queue size: 4096
LOGMINER: Memory Size = 15M, HWM 14M, LWM 13M, 90%
LOGMINER: Memory Release Limit: 0M
LOGMINER: Max Decomp Region Memory: 1M
LOGMINER: Transaction Queue Size: 1024
2025-12-01T22:48:04.942578-08:00

Vinoth Kumar

unread,
Dec 2, 2025, 5:25:13 AMDec 2
to debe...@googlegroups.com
Adding to the below. With this it progressed almost 63M SCNs and StartScn is not even changed. Even Though this is valid Long running transactions from the Application side, can we overcome such cases in Debezium ?

LOGMINER: Summary for session 2209447938, OS id 249842
LOGMINER: StartScn: 9423036857229 (0x00000891f8c3bb8d)
LOGMINER: EndScn: 9423100213632 (0x00000891fc8a7980)

Chris Cranford

unread,
Dec 2, 2025, 10:53:45 AMDec 2
to debe...@googlegroups.com
Hi Vinoth, can you please do me a favor,

Can you checkout the code from https://github.com/Naros/debezium-oracle-query.tool and follow the README on how to compile/build the code. Once you have the code built, could you please run the following:

    java -jar target/quarkus-app/quarkus-run.jar \
        list-changes \
        --hostname <your database.host> \
        --username <your database.user> \
        --password <your database.password> \
        --port <your database.port> \
        --service <your database.dbname> \
        --start-scn 9423036857200 \
        --end-scn 9423069174443 \
        --output extract.csv 

That will generate a CSV file on all the data changes between the two SCN ranges. Can you please ZIP that up and share that with my email privately so I can review the data. The log entry indicates that a transaction was started and is still in-progress, which would explain why the lower SCN does not change. The extract will help identify if thats the case or if there is a potential bug in the connector.

Thanks,
-cc    

Chris Cranford

unread,
Dec 2, 2025, 10:56:34 AMDec 2
to debe...@googlegroups.com
Hi Vinoth, if you have such long running transactions, and those are expected; there is little we can do. Transactions must be mined a very specific way and we cannot advance the low watermark until the transaction commits or rolls back in the case that the connector crashes or is restarted due to a rebalance. Using the tool i shared in the prior email, it would be helpful to look at such transactions and see is the 63M SCNs, are these over a period of a few minutes or over a period of minutes/hours. If its the former, we need to look closer at potential optimizations. But if its the latter, that's a business issue that unfortunately we cannot solve.

-cc

Vinoth Kumar

unread,
Dec 2, 2025, 12:02:09 PMDec 2
to debe...@googlegroups.com
Hi Chris,

We will check the suggested options and share the required details. Also, in DB alert log noticed that to progress SCN in batches takes sometime, is this because of the long running transactions which we do see or multiple connectors mining the same logs ?

Regards,
Vinoth Kumar
8056-274-822

Chris Cranford

unread,
Dec 2, 2025, 12:23:23 PMDec 2
to debe...@googlegroups.com

Vinoth Kumar

unread,
Dec 2, 2025, 12:29:43 PMDec 2
to debe...@googlegroups.com
Do you mean long running transactions or multiple connectors mining same logs, please confirm. 

Regards,
Vinoth Kumar
8056-274-822

Chris Cranford

unread,
Dec 2, 2025, 12:59:40 PMDec 2
to debe...@googlegroups.com
Long running transactions will influence the low watermark advancing. 
Having multiple connectors running can create an IO bottleneck if the redo subsystem is already saturated by normal user load.

Vinoth Kumar

unread,
Dec 3, 2025, 6:21:40 AMDec 3
to debezium

Hi Chris,

We exported the CSV as per the given tool where it comes around 3.1G size, later for better analysis we imported into one of the test MySQL instance where we noticed the stuck SCN 9423036857229 not exists, attached details for reference.

Due to this its stuck, it never moved ahead and waiting for the transaction to complete ? If that's the case how can we overcome such scenario. please suggest.

Also please let us know if you need any other additional details for analysis.

"Offset SCN 9423036857229 has not changed in 25 mining session iterations. This indicates long running transaction(s) are active. Commit SCNs {1=9423127090737, 2=9423127088242}."

SCN.sql

Chris Cranford

unread,
Dec 3, 2025, 9:21:33 AMDec 3
to debe...@googlegroups.com
Hi Vinoth, do you see if 9423036857228 (-1) or 9423036857230 (+1) are in the output?

Vinoth Kumar

unread,
Dec 3, 2025, 11:30:37 AMDec 3
to debezium
Hi Chris,

Do we need to check SCN or START_SCN column ? If SCN then could see 9423036857227/28/30/31 but not 9423036857229 (actual stuck SCN).
I've shared these details in the attachement "SCN.sql" incase if you need for reference.

Thanks,
Vinoth

Chris Cranford

unread,
Dec 3, 2025, 6:06:46 PMDec 3
to debe...@googlegroups.com
I'm afraid I did not see any attachment Vinoth.

Vinoth Kumar

unread,
Dec 3, 2025, 11:11:56 PMDec 3
to debezium
Hi Chris,

No worries, reattached again "SCN.sql". Here I shared the details of SCN, START_SCN, COMMIT_SCN for the stuck Offset SCN.
Please review.

Thanks,
Vinoth
SCN.sql

Chris Cranford

unread,
Dec 4, 2025, 12:17:53 PMDec 4
to debe...@googlegroups.com
Hi Vinoth

I took a look at the code, and this is one of those log entries where the value is misaligned with intent. The transaction in question that causes this would have SCN 9423036857230. And as we can see from your SQL output, it appears those are still in-progress right?

Thanks,
-cc

Chris Cranford

unread,
Dec 4, 2025, 12:51:41 PMDec 4
to debe...@googlegroups.com
As a follow-up, I've added a new enhancement [1] where we'll log the active transactions when this state is identified.
This should avoid any level of ambiguity about what transactions Debezium refers.


-cc

[1]: https://github.com/debezium/dbz/issues/20

Vinoth Kumar

unread,
Dec 4, 2025, 1:33:28 PMDec 4
to debezium
Hi Chris,

Thank you for considering this and raising the enhancement request which really helps in future.
Confused with couple of things, could you please clarify ? Also if you wish to validate anything with the data, can you please share the filter condition with column names so I can share respective results.

1. ""Offset SCN 9423036857229 has not changed in 25 mining session iterations” - Which means it processed till 9423036857229 and from next transaction should we consider "9423036857230" ? or it is unable to process with 9423036857229 itself ?
2. Which column should we consider SCN or START_SCN ? Shared the output of both SCN & START_SCN
3. Say suppose if there is a transactions which runs for longer than 2hrs and then it commits. When there is SCN GAP of 500M or more SCN how this will process ? In our case to process 63M SCN it took almost 12hrs and the archivelog (1G size) fall in 1 hr range.

mysql> SELECT XID, SCN, START_SCN, COMMIT_SCN, ROLLBACK, STATUS, START_TIMESTAMP, COMMIT_TIMESTAMP, operation FROM oracle_changes WHERE SCN=9423036857230;

+------------------+---------------+-----------+------------+----------+--------+---------------------+---------------------+-----------+

| XID              | SCN           | START_SCN | COMMIT_SCN | ROLLBACK | STATUS | START_TIMESTAMP     | COMMIT_TIMESTAMP    | operation |

+------------------+---------------+-----------+------------+----------+--------+---------------------+---------------------+-----------+

| 13001f00913c2200 | 9423036857230 |         0 |          0 | 0        | 0      | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | INTERNAL  |

| 13001f00913c2200 | 9423036857230 |         0 |          0 | 0        | 0      | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | UPDATE    |

| 70000a0007950600 | 9423036857230 |         0 |          0 | 0        | 0      | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | UPDATE    |

| 70000a0007950600 | 9423036857230 |         0 |          0 | 0        | 0      | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | UPDATE    |

| 64001a00b24d0500 | 9423036857230 |         0 |          0 | 0        | 0      | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | START     |

| 64001a00b24d0500 | 9423036857230 |         0 |          0 | 0        | 0      | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | INSERT    |

| 64001a00b24d0500 | 9423036857230 |         0 |          0 | 0        | 0      | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | INSERT    |

+------------------+---------------+-----------+------------+----------+--------+---------------------+---------------------+-----------+

7 rows in set (1.66 sec)

mysql> SELECT XID, SCN, START_SCN, COMMIT_SCN, ROLLBACK, STATUS, START_TIMESTAMP, COMMIT_TIMESTAMP, operation FROM oracle_changes WHERE START_SCN=9423036857230;

Empty set (1.65 sec)

mysql> SELECT XID, SCN, START_SCN, COMMIT_SCN, ROLLBACK, STATUS, START_TIMESTAMP, COMMIT_TIMESTAMP, operation FROM oracle_changes WHERE SCN=9423036857229;

Empty set (1.69 sec)

mysql> SELECT XID, SCN, START_SCN, COMMIT_SCN, ROLLBACK, STATUS, START_TIMESTAMP, COMMIT_TIMESTAMP, operation FROM oracle_changes WHERE START_SCN=9423036857229;

Empty set (1.65 sec)

 mysql>


Chris Cranford

unread,
Dec 5, 2025, 8:39:23 AMDec 5
to debe...@googlegroups.com
Hi Vinoth,

Regarding (1), the message as it is currently written requires understanding how the connector handles offsets. The offset is always 1 SCN before where we want to read, which means we've read up to and including 
9423036857229. So this means the transaction that starts at 9423036857230 is what is causing the issue. This is where the enhancement will help clarify which transactions are problematic and allow you to look for them by transaction id rather than SCN, since transaction ids are unique and SCNs are not.

Regarding (2), you should never trust START_SCN nor COMMIT_SCN when using LogMiner in uncommitted data mode. These fields are only populated if and only if a transaction starts and ends within the SCN boundary you've specified in the LogMiner session arguments. We don't use these in Debezium's buffered implementation, only SCN is used. So you should go by that column only and ignore the other two.

Lastly regarding long-running transactions, this really depends on whether LOB is enabled or disabled. The algorithm here is very technical in nature and varies on a variety of factors and current database state. But what's most important is that Debezium will continue to load logs starting from the position where that long running transaction starts. This means potentially more and more data that needs to be handled by LogMiner over that 2 hour period. If your database is generating tens to hundreds of GBs of redo during this same window, this can compound into growing latency. 

The more critical point to remember is long running transactions not only create higher IO for the LogMiner database process, but they also continue to consume more and more heap in the connector's JVM process. Moreover, if the Connect environment suffers an OutOfMemoryError, the environment undergoes a rebalance, or the configuration of the connector is updated while such a long running transaction is in progress, the connector will restart where that long running transaction started several hours prior. This is all because Oracle writes uncommitted transactions to its log, and they're only published to your topics when the transaction commits. 

To handle a gap of 500M, this is where setting ideal `log.mining.batch.size.*`, `log.mining.sleep.time.*`, `log.mining.query.filter.mode`, and `query.fetch.size` connector settings can really help. 

But one question on "63M SCN taking 12 hours and 1GB archive log in 1hr range", are you saying you had 63M unique SCNs, and they were all in a single 1GB archive log, and it took 12 hours to mine that? If my understanding is correct, this is far too long for so little and this sounds not an issue with Debezium but one with Oracle, and I would ask that during this period of time, share your database alert logs for all RAC nodes.

Thanks,
-cc

Vinoth Kumar

unread,
Dec 8, 2025, 6:46:42 AMDec 8
to debezium

Hi Chris,

 Thank you for the details, Just a note this is Oracle 19c CDB !

 We almost have the params already except log.mining.sleep.time.* & query.fetch.size  and below is the connector config. Kindly Note: Onboarded 500+ tables. 1st connector  - 480 tables and table size is small, 2nd Connector - 15 tables which has huge LOBs and rest all 3 connectors has not more than 3-5 tables which are either BIG in size or some tables don't have PK/Unique key.

 To answer your question, if you see the below logs. To process 32M SCNs btwn 9423036857229 & 9423037474443 it took atleast 10hrs and need to check 6 unique archivelog and redolog allocated with 1G. Also no commits were found (Verified this info in MySQL DB for the XIDs “13001f00913c2200, 70000a0007950600 , 64001a00b24d0500 with SCN 9423036857230).

 Can you please assist the next steps.

  1. Should we need to revisit and reduce the no.of connectors which contributes more IO to process same info again with LogMiner however there is NO Guarantee that it will not stuck SCN.
  2. Even if this is genuine long running transaction/batch with high gap in SCN, how can we overcome such scenarios.
  3. Also as per below logs Commit SCNs {1=9423062374267, 2=9423062373495} found but LogMiner already processed all those SCNs. No commits were found for all the XIDs (Verified this info in MySQL DB for the XIDs “13001f00913c2200, 70000a0007950600 , 64001a00b24d0500 with SCN 9423036857230).

Offset SCN 9423036857229 has not changed in 25 mining session iterations. This indicates long running transaction(s) are active. Commit SCNs {1=9423062374267, 2=9423062373495}."

 select inst_id, thread#, sequence#, first_change#, first_time,next_change#,next_time,completion_time from gv$archived_log

where dest_id=1 and first_change#>=9423036857229

and next_change#<=9423069174443 order by first_change# ;

   INST_ID    THREAD#  SEQUENCE#   FIRST_CHANGE# FIRST_TIME              NEXT_CHANGE# NEXT_TIME            COMPLETION_TIME    

---------- ---------- ---------- --------------- -------------------- --------------- -------------------- --------------------

         2          1      43921   9423037957169 01 DEC 2025 12:44:57   9423049206943 01 DEC 2025 13:14:58 01 DEC 2025 13:14:59

         1          1      43921   9423037957169 01 DEC 2025 12:44:57   9423049206943 01 DEC 2025 13:14:58 01 DEC 2025 13:14:59

         2          2      38771   9423037968932 01 DEC 2025 12:44:59   9423049226816 01 DEC 2025 13:15:00 01 DEC 2025 13:15:00

         1          2      38771   9423037968932 01 DEC 2025 12:44:59   9423049226816 01 DEC 2025 13:15:00 01 DEC 2025 13:15:00

         1          1      43922   9423049206943 01 DEC 2025 13:14:58   9423060091763 01 DEC 2025 13:44:56 01 DEC 2025 13:44:58

         2          1      43922   9423049206943 01 DEC 2025 13:14:58   9423060091763 01 DEC 2025 13:44:56 01 DEC 2025 13:44:58

         2          2      38772   9423049226816 01 DEC 2025 13:15:00   9423060101162 01 DEC 2025 13:44:58 01 DEC 2025 13:44:58

         1          2      38772   9423049226816 01 DEC 2025 13:15:00   9423060101162 01 DEC 2025 13:44:58 01 DEC 2025 13:44:58

         1          1      43923   9423060091763 01 DEC 2025 13:44:56   9423068040157 01 DEC 2025 14:14:57 01 DEC 2025 14:14:59

         2          1      43923   9423060091763 01 DEC 2025 13:44:56   9423068040157 01 DEC 2025 14:14:57 01 DEC 2025 14:14:59

         1          2      38773   9423060101162 01 DEC 2025 13:44:58   9423068040313 01 DEC 2025 14:14:59 01 DEC 2025 14:15:00

         2          2      38773   9423060101162 01 DEC 2025 13:44:58   9423068040313 01 DEC 2025 14:14:59 01 DEC 2025 14:15:00

 

2025-12-01T12:46:12.662021-08:00
LOGMINER: Summary for session 2164108289, OS id 374401
LOGMINER: StartScn: 9423036857229 (0x00000891f8c3bb8d)
LOGMINER: EndScn: 9423037474443 (0x00000891f8cd268b)


LOGMINER: HighConsumedScn: 0
LOGMINER: PSR flags: 0x0
LOGMINER: Session Flags: 0x4000441

LOGMINER: Session Flags2: 0x0


LOGMINER: Read buffers: 4
LOGMINER: Region Queue size: 256
LOGMINER: Redo Queue size: 4096
LOGMINER: Memory Size = 15M, HWM 14M, LWM 13M, 90%
LOGMINER: Memory Release Limit: 0M
LOGMINER: Max Decomp Region Memory: 1M
LOGMINER: Transaction Queue Size: 1024

2025-12-01T22:48:04.878580-08:00


LOGMINER: Summary for session 2164177921, OS id 374401
LOGMINER: StartScn: 9423036857229 (0x00000891f8c3bb8d)
LOGMINER: EndScn: 9423069174443 (0x00000891fab0daab)

LOGMINER: HighConsumedScn: 0
LOGMINER: PSR flags: 0x0
LOGMINER: Session Flags: 0x4000441
LOGMINER: Session Flags2: 0x400
LOGMINER: Read buffers: 4
LOGMINER: Region Queue size: 256
LOGMINER: Redo Queue size: 4096
LOGMINER: Memory Size = 15M, HWM 14M, LWM 13M, 90%
LOGMINER: Memory Release Limit: 0M
LOGMINER: Max Decomp Region Memory: 1M
LOGMINER: Transaction Queue Size: 1024
2025-12-01T22:48:04.942578-08:00

 Connector Info:

    #Debezium Engine/Queing Settings
    max.batch.size: 8192
    max.queue.size: 65536
    max.queue.size.in.bytes: 536870912  #512MB
    log.mining.query.filter.mode: in         
              

   topic.prefix: DBNAME


    topic.creation.enable: true
    topic.creation.default.replication.factor: -1
    topic.creation.default.partitions: -1
    topic.creation.default.retention.ms: 1209600000
    schema.include.list: APPNAME,DBZUSER
    table.include.list: APPNAME.TABLE1,APPNAME.TABLE2,DBZUSER.HEARTBEAT,DBZUSER.SIGNAL

    log.mining.batch.size.default: 60000
    log.mining.batch.size.max: 1000000
    log.mining.batch.size.min: 10000
    log.mining.scn.gap.detection.gap.size.min: 1000000      # 1 million SCNs
    log.mining.scn.gap.detection.time.interval.max.ms: 10000 # 10 seconds
              
    #Special character
    field.name.adjustment.mode: avro
    #BLOB, RAW   
    binary.handling.mode: base64

Chris Cranford

unread,
Dec 8, 2025, 8:16:01 AMDec 8
to debe...@googlegroups.com
Hi Vinoth,

If no commits were found, did you look for rollbacks? If neither are found, then it sounds to me as though these transactions were still in-progress, right?

(1): The number of connectors you deploy will have a direct impact on the system. The more LogMiner processes that are competing to read the archive and redo logs, the more IO saturation you're going to see. This is one of the reasons we generally advocate users to use a single connector and only horizontally scale as needed after verifying performance. 

(2): Can the long running transaction/batch be split into smaller transactions allowing the process to commit more often? 

(3): Yes, the Commit SCNs here describe the highest commit point per redo thread we've processed.

-cc

Vinoth Kumar

unread,
Dec 8, 2025, 8:46:39 AMDec 8
to debezium
Hi Chris,

Thank you for the quick update !

Yes no commit/rollback observed with the LogMiner data which we captured for those 32M SCNs for the transactions associated with the SCN 9423036857230, also took 10hrs to process this. Even to monitor the performance we stopped the other connectors and currently left with only 2 connectors but still that takes huge latency to process 60M SCN atleast 6-10hrs which I observed randomly.

Honestly we don’t have a control on those long running transactions. Also we do have a Goldengate running on the same database where we don’t see issues. I agree that Debezium waits for a transaction to commit/rollback for all transactions associated with the SCN however Goldengate doesn’t so is there any way to optimize or achieve similar performance or that’s the limitation with Debezium. Please clarify.

Chris Cranford

unread,
Dec 8, 2025, 10:39:43 AMDec 8
to debe...@googlegroups.com
Hi Vinoth -

This is the significant difference between adhoc mining with LogMiner versus using Oracle's continuous mining features available with XStream and GoldenGate. Perhaps you might want to consider using the XStream adapter if you have an Oracle GoldenGate license, rather than LogMiner?

-cc

Vinoth Kumar

unread,
Dec 8, 2025, 11:54:15 AMDec 8
to debe...@googlegroups.com
Hi Chris,

Thank you for the comments !

So you mean with the scenario which we see is NOT sufficient to handle via Debezium LogMiner adapter, please confirm. 

Regards,
Vinoth Kumar
8056-274-822

On Mon, 8 Dec, 2025, 9:09 pm Chris Cranford, <cran...@gmail.com> wrote:
Hi Vinoth -

Chris Cranford

unread,
Dec 8, 2025, 3:24:42 PMDec 8
to debe...@googlegroups.com
Hi,

In practice, long running transactions and CDC don't mix well because something has to buffer that transaction until its committed. In some database platforms like SQL Server, PostgreSQL, MySQL, and MariaDB; the database handles this natively. The only things we see in the transaction logs are the things that have been committed, and so the connector is simply reading entry by entry, doing a conversion and dispatching the event on to your topic. For other connectors like Oracle, this depends on the technology interface you use on how the changes are managed.

When using Debezium with LogMiner, Debezium is responsible for buffering the transaction. This means we need to properly handle transaction management boundaries in a way that guarantees consistency. LogMiner has a number of quirks and behaviors that Debezium has to unfortunately manage if we expect to provide any reliable stream of changes. When you have long running transactions, this impacts the efficiency of LogMiner's ability to provide consistency. That transaction's start position needs to be included in the window for LogMiner to properly stitch state across the entire transaction.

One might think to use the new Debezium Unbuffered LogMiner mode we introduced several releaes ago; however it shares similar limitations. It still must read the transaction logs in the exact same way. The only technical difference is that rather than the memory buffer being managed by Debezium at the connector level, this buffer is managed at the LogMiner process level. And because memory management in Oracle databases are much more rigid and depends on what other processes are doing, you can easily face PGA_AGGREGATE_LIMIT exceptions and the connector will simply be able to generate the event stream. This often happens as a result of long running transactions or transactions that change millions of rows or rows with lots of large data columns.

This is where Debezium with Oracle XStream shines.  The Oracle XStream technology provides access to continous mining, and the buffering and mining is handled transitively by the database. In this case, Debezium is simply a receiver of Oracle's payloads. In other words, Debezium with Oracle XStream makes the Oracle connector work more like you see with SQL Server, PostgreSQL, MySQL, and MariaDB. It's just a thin client that receives payload data, validates, transforms, and emits the events without any buffering. And since you have an existing Oracle GoldenGate license for this instance, that's why I am recommending it. 

It's certainly something to explore if you cannot control these long running transactions that can take hours to finish.

Thanks,
-cc
--
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.

Vinoth Kumar

unread,
Dec 9, 2025, 5:56:37 AMDec 9
to debezium
Hi Chris,

Thanks for the detailed explanation regarding Debezium with LogMiner and XStream.

Wanted to check how OpenLog Replicator (OpenSource) would handle this use case, especially with long-running transactions. Would it behave more like XStream, processing SCNs as transactions are committed or would it face similar limitations as LogMiner, waiting for transactions to complete?

Additionally, it would be very helpful if you could share your experience using OpenLog Replicator for the Oracle connector in production scenarios.

Chris Cranford

unread,
Dec 9, 2025, 7:51:41 AMDec 9
to debe...@googlegroups.com
Hi Vinoth -

OLR buffers the transactions locally, but it does so using a similar continuous mining feature as XStream. As for production experiences, I know some members of the community have at least tried it in development, but I am not aware of anyone who has taken it to production. 

-cc
Reply all
Reply to author
Forward
0 new messages