proxy_socket_keepalive how to?

narksu nginx-forum at
Fri Nov 27 11:29:16 UTC 2020

I need to enable tcp keepalive messages betwin nginx and backend. There is
POST which have to be replyed from backend within about 40-50 minutes but my
session closed by timeout(2 hour), i think it is firewall wich drop session
from nginx to backend due unactivity. If I make a curl directly to backend
from nginx server, there are tcp keepalive in tcpdump and I receive reply
from backend in 40 minutes. Tried to use proxy_socket_keepalive=on in
location section but tcpkeepalive not appear in tcpdump and session stil
close by timeout. So what is the proper way to enable

Posted at Nginx Forum:,290085,290085#msg-290085

More information about the nginx mailing list