hertzbeat icon indicating copy to clipboard operation
hertzbeat copied to clipboard

[Question] <Does HertzBeat port 1158 not support Nginx forwarding>

Open Kylin-Guo opened this issue 1 year ago • 5 comments

Question

因在实际使用中,HertzBeat 1157 端口是使用Nginx进行反代访问,在新版本中发现Collector Cluster 1158 端口若使用Nginx转发的情况下,下游部署的采集器会持续占用系统CPU及RAM,且会产生非常多的日志(启动1分钟大概160MB日志)

b4759a625c602eda4344513f38b08ec

部分日志内容: image image

Kylin-Guo avatar Aug 16 '23 03:08 Kylin-Guo

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Question

Because in actual use, HertzBeat 1157 port uses Nginx for reverse generation access. In the new version, it is found that if Collector Cluster 1158 port is forwarded by Nginx, the collector deployed downstream will continue to occupy the system CPU and RAM, and will generate A lot of logs (about 160MB logs in 1 minute after startup)

b4759a625c602eda4344513f38b08ec

Part of the log content: image image

hertzbeat avatar Aug 16 '23 03:08 hertzbeat

hi 看日志报错是压缩格式不支持nginx转发好像,下游采集器持续CPU 内存增大我们这边研究复现下,如果是非nginx转发而是直连 会有CPU内存异常这种情况吗,这个环境采集器的大概的监控数量是多少哦

tomsun28 avatar Aug 16 '23 03:08 tomsun28

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Hi, the error reported in the log is that the compressed format does not support nginx forwarding. It seems that the downstream collector continues to increase the CPU memory. Our research reproduces it here. If it is not nginx forwarding but directly connected, will there be abnormal CPU memory? This environment collector What is the approximate number of monitors?

hertzbeat avatar Aug 16 '23 03:08 hertzbeat

hi 看日志报错是压缩格式不支持nginx转发好像,下游采集器持续CPU 内存增大我们这边研究复现下,如果是非nginx转发而是直连 会有CPU内存异常这种情况吗,这个环境采集器的大概的监控数量是多少哦

直连的话暂时没有出现这个问题,这个环境的监控数量总共有37个api,但启用监控的只有一个,负载应该可以忽略不计了

Kylin-Guo avatar Aug 16 '23 04:08 Kylin-Guo

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


hi, the error reported in the log is that the compressed format does not support nginx forwarding. It seems that the downstream collector continues to increase the CPU memory. Our research reproduces it here. If it is not forwarded by nginx but directly connected, will there be abnormalities in CPU memory? This environment collects What is the approximate monitoring quantity of the device?

There is no such problem in the case of direct connection. There are a total of 37 APIs monitored in this environment, but only one is enabled for monitoring. The load should be negligible.

hertzbeat avatar Aug 16 '23 04:08 hertzbeat