{
  "id": "kafka/transaction-abort-timeout",
  "signature": "org.apache.kafka.common.errors.TransactionTimeoutException: The transaction coordinator has aborted the transaction due to timeout",
  "signature_zh": "事务超时异常：事务协调器因超时已中止事务",
  "regex": "TransactionTimeoutException: The transaction coordinator has aborted the transaction due to timeout",
  "domain": "kafka",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "A Kafka transaction exceeded the configured max.transaction.timeout.ms, causing the coordinator to abort it to free resources.",
  "root_cause_type": "generic",
  "root_cause_zh": "Kafka事务超过了配置的max.transaction.timeout.ms，导致协调器中止事务以释放资源。",
  "versions": [
    {
      "version": "Kafka 3.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Kafka 3.7.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The broker's max.transaction.timeout.ms overrides the producer setting, so the timeout still applies.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "It is not a fix; it changes the application's semantics and may cause duplicate writes.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase `max.transaction.timeout.ms` in broker config (e.g., to 300000) and restart broker, then set producer's `transaction.timeout.ms=120000`.",
      "success_rate": 0.85,
      "how": "Increase `max.transaction.timeout.ms` in broker config (e.g., to 300000) and restart broker, then set producer's `transaction.timeout.ms=120000`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Optimize transaction logic to complete within the default 60000ms by batching fewer records or reducing external calls.",
      "success_rate": 0.8,
      "how": "Optimize transaction logic to complete within the default 60000ms by batching fewer records or reducing external calls.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Example broker config: `transaction.max.timeout.ms=300000` in server.properties, then producer config: `props.put(ProducerConfig.TRANSACTION_TIMEOUT_CONFIG, 120000);`",
      "success_rate": 0.88,
      "how": "Example broker config: `transaction.max.timeout.ms=300000` in server.properties, then producer config: `props.put(ProducerConfig.TRANSACTION_TIMEOUT_CONFIG, 120000);`",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase `max.transaction.timeout.ms` in broker config (e.g., to 300000) and restart broker, then set producer's `transaction.timeout.ms=120000`.",
    "Optimize transaction logic to complete within the default 60000ms by batching fewer records or reducing external calls.",
    "Example broker config: `transaction.max.timeout.ms=300000` in server.properties, then producer config: `props.put(ProducerConfig.TRANSACTION_TIMEOUT_CONFIG, 120000);`"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://kafka.apache.org/documentation/#transaction_config",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}