---
title: "Kafka transaction.timeout.ms: the coordinator aborts"
description: "A transaction is never resolved. After transaction.timeout.ms the Kafka coordinator aborts it, releases the LSO and fences the producer with an epoch bump."
url: https://monedula.dev/kafka-simulator/scenarios/txn-timeout/
---

# Kafka transaction.timeout.ms: the coordinator aborts

Scenario 04.2.4 · Transaction timeout. Transactions · Advanced · about 3 min · Apache Kafka 4.3.

An open transaction left unresolved past transaction.timeout.ms is auto-aborted by the coordinator; the LSO releases and an epoch bump fences the producer.

Run it: https://monedula.dev/kafka-simulator/playground/?scenario=04.2.4

## What you start with

A producer opens a transaction and then never commits or aborts it. The transaction coordinator enforces transaction.timeout.ms, counted from when the first partition joins the transaction: once it expires, its next periodic check auto-aborts the abandoned transaction on the producer's behalf.

## Step by step

1. **Cluster ready · txn timeout armed** (t+0.000s): orders has 1 partition, RF=3. transaction.timeout.ms is 2000 ms. A transactional producer tx1 is idle; group rc is read_committed. Press ▶. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=04.2.4&t=0)
2. **Open · uncommitted, timer running** (t+1.000s): tx1 began a transaction (the simulator schedules its txn_timeout for 2100, begin + 2000 ms; Kafka would count from the first partition added, at 200) and wrote offset 0. The record is replicated (HW advanced) but the LSO is held at 0 - read_committed sees nothing while the timer counts down. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=04.2.4&t=1)
3. **Timed out · auto-aborted** (t+2.600s): tx1 never committed. Once transaction.timeout.ms passed, the coordinator's periodic check auto-aborted it: the offset-0 record becomes an aborted range, the LSO releases to the high watermark, and tx1 is errored (the simulator calls it transaction_timed_out; Kafka bumps the epoch, so tx1's next send or commit fails with an epoch error). read_committed skips the aborted record entirely. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=04.2.4&t=2)

## The takeaway

The coordinator writes abort markers, the LSO is released and the epoch bump fences the producer, which finds out on its next operation - an abandoned transaction can never pin the LSO indefinitely.

## Configs in this scenario

- [`transaction.timeout.ms`](https://kafka.apache.org/43/configuration/producer-configs/#producerconfigs_transaction.timeout.ms): The longest a transaction may stay open, counted from the first partition added to it, before the transaction coordinator aborts it (default 60000, 1 minute); it may not exceed the broker transaction.max.timeout.ms.

## Further reading

- [Apache Kafka documentation](https://kafka.apache.org/43/configuration/producer-configs/#producerconfigs_transaction.timeout.ms)

## Troubleshooting

- [Kafka transaction timed out (transaction.timeout.ms)](https://monedula.dev/kafka-simulator/troubleshooting/transaction-timed-out/)
