Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

keep alive errors seen in nginx logs

In var/log/nginx/https-error_log and var/log/nginx/http-error_log, I see tens of millions of errors (aggregated over the past several months):

client xx.xx.xxx.xxx closed keepalive connection

Frequently (but not always) they exist in pairs with the same IP address and timestamp even, e.g.:

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

I.e. it seems the same person closed the connection twice at the same point in time? I feel something untoward is going on here. I'm using nginx as a reverse proxy in front of gunicorn (it's a Django app). Can anyone with expertise help me troubleshoot this issue, or speculate what it could be? Alternatively, is it something I shouldn't worry about?

like image 974
Hassan Baig Avatar asked Oct 27 '25 09:10

Hassan Baig


1 Answers

from: 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/

although for my 2 cents, I'm not sure closing a HTTP/1.1 connection should be "info", more like "debug".

The "in pairs" would be your browser making more than one connection to your server (as is normal). You can verify the number of connections with the developer tools on your browser (under network).

Cameron

like image 58
Cameron Gregory Avatar answered Oct 30 '25 12:10

Cameron Gregory



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!