elasticsearch resource_error ai_generated true

TranslogTooLargeException: 事务日志大小[2.5gb]超过最大大小[1.0gb]

TranslogTooLargeException: translog size [2.5gb] exceeds maximum size [1.0gb]

ID: elasticsearch/translog-too-large

其他格式: JSON · Markdown 中文 · English
80%修复率
84%置信度
1证据数
2024-04-12首次发现

版本兼容性

版本状态引入弃用备注
elasticsearch 8.11 active
elasticsearch 8.12 active
elasticsearch 7.17 active
opensearch 2.9 active

根因分析

事务日志增长超过配置的最大大小(默认1GB),通常由于刷新缓慢或高写入速率。

English

The translog has grown beyond the configured maximum size (default 1GB), often due to slow flushing or high write rate.

generic

官方文档

https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-translog.html

解决方案

  1. 手动刷新索引以清除事务日志。
  2. 增加事务日志阈值并执行刷新。
  3. 暂时降低索引速率以允许事务日志自然刷新,然后永久增加刷新阈值。

无效尝试

常见但无效的做法:

  1. 95% 失败

    Corrupts the index; Elasticsearch will fail to recover and may lose data.

  2. 50% 失败

    Delays flush but does not reduce existing translog size; may cause OOM on large translog.

  3. 80% 失败

    Force merge does not affect translog size; translog is separate from segments.