您的位置 首页 kubesphere

KubeSphere 中某个容器日志不正常采集解决方案

一次生产 KubeSphere 日志无法正常采集事件解决记录_cannot increase buffer: current=512000 requested=5-CSDN博客

现象:

就是一个容器日志,突然就不采集:

问题定位:

ES 都正常,

发现 这个容器所在的worker4节点 , 上的 fluent-bit 有错误日志:

名称:fluent-bit

 

发现异常日志:

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"invalid character in name"}],"type":"illegal_argument_exception","reason":"invalid character in name"},"status":400}

 

 [2025/01/23 06:16:35] [ warn] [engine] failed to flush chunk '30-1737612995.511968685.flb', retry in 8 seconds: task_id=13, input=tail.4 > output=es.2 (out_id=2)


 

[2025/01/23 05:32:16] [ warn] [http_client] cannot increase buffer: current=512000 requested=544768 max=512000

 

这通常是由于日志产生的速度过快,而内存缓冲区无法及时处理并写入到输出目标中

解决方案

在 Fluent Bit 场景中,memBufLimit 和 buffer_size 的作用如下:

memBufLimit 用于限制 Fluent Bit 整体内存缓冲区的大小,以确保其在合理的内存范围内运行。

buffer_size 用于控制输出插件的缓冲区大小,以提高传输效率和内存消耗。

在kubesphere 中

第一步:

在"定制资源定义(CRD)"->input->"tail" 修改 memBufLimit 参数限制大小,可参考下图:

memBufLimit  默认是 5MB ,改为10MB

第二步:(忽略)

在"定制资源定义(CRD)"->Output->"es" 修改 bufferSize 参数大小,可参考下图:

我这里没有找到 bufferSize  参数,然后就没有修改。

 

等1分中,发现就有日志了

欢迎来撩 : 汇总all

白眉大叔

关于白眉大叔linux云计算: 白眉大叔

热门文章