在 nginx 日志中看到保持活动状态的错误

keep alive errors seen in nginx logs

var/log/nginx/https-error_logvar/log/nginx/http-error_log 中,我看到了数千万个错误(过去几个月的汇总):

client xx.xx.xxx.xxx closed keepalive connection

它们经常(但不总是)成对存在,甚至具有相同的 IP 地址和时间戳,例如:

2016/07/12 19:24:59 [info] 44815#0: *82924 client 82.145.210.66 closed keepalive connection
2016/07/12 19:24:59 [info] 44821#0: *83275 client 82.145.210.66 closed keepalive connection

即似乎同一个人在同一时间点关闭了两次连接?我觉得这里发生了一些不愉快的事情。我在 gunicorn 前使用 nginx 作为反向代理(它是一个 Django 应用程序)。任何有专业知识的人都可以帮助我解决这个问题,或者推测它可能是什么吗?或者,这是我不应该担心的事情吗?

来自:https://forum.nginx.org/read.php?2,1680,248005#msg-248005

This is not a problem to solve, it's just information messages logged by nginx. If it's too verbose for you, consider tuning error_log logging level, see http://nginx.org/r/error_log.

-- Maxim Dounin http://nginx.org/

尽管为了我的 2 美分,我不确定关闭 HTTP/1.1 连接应该是 "info",更像是 "debug".

"in pairs" 表示您的浏览器与您的服务器建立了多个连接(正常情况下)。您可以在浏览器(网络下)上使用开发者工具验证连接数。

卡梅伦