Welcome! Log In Create A New Profile

Advanced

so_keepalive option for outbound sockets

Aditya Umrani
July 21, 2016 10:04PM
Hello,

I've configured the so_keepalive option for a server (this is also my
default server). I do have other server configs listening to the same
port.
========
listen 9822 default_server so_keepalive=on;
listen 29822 ssl http2 default_server so_keepalive=on;
========

My sysctl settings are set to :
========
net.ipv4.tcp_keepalive_time = 120
net.ipv4.tcp_keepalive_probes = 10
net.ipv4.tcp_keepalive_intvl = 120
========

However, I see that no tcp keepalive packets are being sent on
outbound connections (from nginx to the upstream). I also checked the
output of 'netstat -an --timers' I see that no outbound sockets have
the 'keepalive' flag. All of them are 'off'. If it matters, the server
config which actually servers this request is not the default one, but
one of the other configs.
I took a quick look at the code and the 'SO_KEEPALIVE' options only
shows up on functions which deal with listening sockets. Does this
mean that nginx does not honor this option for outbound connections?

Thanks,
Aditya

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

so_keepalive option for outbound sockets

Aditya Umrani July 21, 2016 10:04PM

Re: so_keepalive option for outbound sockets

Maxim Dounin July 22, 2016 10:34AM

Re: so_keepalive option for outbound sockets

Aditya Umrani July 22, 2016 12:56PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 138
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready