On Wed, Jan 13, 2010 at 1:15 PM, Willy Tarreau <w...@1wt.eu> wrote: >> One thing I've had trouble with when doing mysql though was the >> connection timeouts. I tried using tcpka but that didn't do it. >it would not change because tcpka enables tcp keepalives which just >the system is aware of. It is not applicative at all and generally >runs at a very low rate (eg: one KA every 2 hours).
Ah, ok. So tcpka doesn't say, override, the timeout values and reset them to 0 if a valid KA is processed (however that works.) tcpka just keeps the underlying TCP connection in place, but timeout limits (and whatever else) still may close that connection. >> So I do have trouble with connections of a long duration but where there is >> little actual data. Usually some client application that makes a >> connection once at the start and then goes idle waiting for some input >> from a client of its own. If anyone might know how to keep such an >> idle (but still valid) connection alive (other than a gigantic >> timeout), I'd love suggestions. > > You have no other possibility. What you want is to maintain open a > connection eventhough nothing happens at the application level for > a very long period. That's what the timeout is made for. People > balancing TSE farms or LDAP servers are well aware of the same > requirement :-) Rats, I was afraid of that. I actually am doing LDAP(S) so I'm slowly pushing my timeout client/server up. I don't want an insanely high value, but I do want it sufficiently high that I can process say 80% or 90% of my connections/queries w/out hurting them. The remaining 10%/20% that's *really* long, I dunno. I'll have to figure something else out :) If anyone ever does dream up some nifty way, please drop us a note :) Thank you, PH