You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Sarama向Redpanda发消息报Broker不可用,磁盘阈值由何配置控制?

Redpanda磁盘空间阈值控制配置项

你的客户端报错The broker is not available是间接错误,实际原因是Redpanda节点磁盘剩余空间低于阈值,拒绝了生产请求,对应systemctl日志里的rejecting produce request: no disk space; bytes free less than configurable threshold和存储告警信息。

控制Redpanda磁盘空间阈值的是以下两个配置项:

  • storage_min_free_bytes:磁盘必须保留的最小空闲字节数,默认值为1GiB(1073741824字节)。当磁盘空闲空间低于该值时,Redpanda会拒绝写入请求。
  • storage_free_space_percent:磁盘空闲空间的百分比阈值,默认值为5%。当磁盘空闲空间占比低于该值时,同样会触发写入拒绝。

这两个配置是或的关系,只要满足其中一个阈值条件,Redpanda就会拒绝生产请求。

你可以通过rpk命令修改这些配置:

# 修改最小空闲字节数为2GiB
rpk cluster config set storage_min_free_bytes 2147483648

# 修改空闲空间百分比为10%
rpk cluster config set storage_free_space_percent 10

内容的提问来源于stack exchange,提问作者user2233706

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.11 08:20:27