Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

agent在某时段内存过高引起机器异常 #32

Open
zntim opened this issue May 3, 2018 · 3 comments
Open

agent在某时段内存过高引起机器异常 #32

zntim opened this issue May 3, 2018 · 3 comments

Comments

@zntim
Copy link

zntim commented May 3, 2018

agent在某一时段会dir /proc并发读取打开过高,引起内存异常报警,持续大概5-10分钟左右,根据zabbix监控瞬间占用达3.5个G,应该怎么限制同时读取的并发或者限制agent使用最大使用内存?

@icxcoffee
Copy link
Contributor

驭龙agent存在内存泄露,长期运行会导致内存持续增长,最简单的办法是定期重启agent即可

@zntim
Copy link
Author

zntim commented Nov 15, 2018

驭龙剂存在内存泄露,长期运行会导致内存持续增长,最简单的办法是定期重启剂即可

驭龙agent存在内存泄露,长期运行会导致内存持续增长,最简单的办法是定期重启agent即可

server端定时重启是没问题,agent如果上线后是在业务侧这个定时重启动作太大了吧

@icxcoffee
Copy link
Contributor

不是重启服务器,就只是杀掉agent进程就可以了,daemon会重新启动agent,动作不大,就和驭龙任务里面的reload一样,比如在daemon.go中添加如下代码实现每5天重启一次agent:

	go func() {
		ticker := time.NewTicker(time.Hour * 24 * 5) //每5天kill一次
		for range ticker.C {
			common.KillAgent()
		}
	}()

当然还可以考虑杀的时间尽量在凌晨的时候,或者agent内存突然达到某个阈值时,也应该及时杀掉。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants