r/haproxy • • Jun 17 '25

Session Timeout

I have an issue where the haproxy server is timing out after 5 minutes even when I have the timeout queue,client and server all set to 35 minutes. The linux box itself has the net.ipv4.tcp.keepalive-time=1800, net.ipv4.tcp.keepalive-intrvl=60 and net.ipv4.tcp.keepalive-probes=9 but still server times out after 5 minutes. if I set the keep alive time to 240 then it stays up for ever. What I want is the connection to drop after 30 minutes of being idle. What am I missing here?

2 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/BarracudaDefiant4702 Jun 18 '25

You are right, http-keep-alive isn't relevant, because I missed the mode tcp in the default section... The SD means it closed on the server side. There is a probably a timeout on server lun1 1.1.1.1:1024 (I assume that's not the real IP?). Can you connect to that directly and idle over 5 minutes? What about from the same machine haproxy is running on? Have you checked the logs on the server? Based on the SD it does sound either server side, or connection tracking / firewall dropping the connection.