gpt4 book ai didi

logging - 配置 nginx 不记录 ELB 辅助健康检查

转载 作者:行者123 更新时间:2023-12-02 10:27:47 29 4
gpt4 key购买 nike

Amazon Elastic Load Balancer (ELB) 定期执行运行状况检查:

In addition to the health check you configure for your load balancer, a second health check is performed by the service to protect against potential side-effects caused by instances being terminated without being deregistered. To perform this check, the load balancer opens a TCP connection on the same port that the health check is configured to use, and then closes the connection after the health check is completed.

nginx 会记录这些事件并显示 400 错误,这种错误每分钟会发生多次:

[07/8/2013:18:32:27 +0000]“-”0.000 400 0“-”“-”“-”

如何配置 nginx 不记录这些事件?

最佳答案

解决方案是不要使用旧版不受支持的 nginx 版本。从版本 1.3.15(相当旧的版本)开始,nginx 在这种情况下不会记录 400 错误。

查看变更日志以获取信息:http://nginx.org/en/CHANGES

*) Change: opening and closing a connection without sending any data in
it is no longer logged to access_log with error code 400.

关于logging - 配置 nginx 不记录 ELB 辅助健康检查,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18111260/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com