On Thu, Apr 1, 2010 at 1:18 AM, Willy Tarreau <w#1wt.eu> wrote:
>
> On Wed, Mar 31, 2010 at 06:33:33PM -0400, Morgan Aldridge wrote:
>>
>> I've tried adding 'option tcpka', to no avail. Obviously, increasing
>> 'srvtimeout' (which is set to '50000' in my defaults) helps, but
>> shouldn't 'option tcpka' prevent that need? Or, is there a value I
>> should set 'srvtimeout' to which will be higher than the number of
>> milliseconds between keep-alive packets?
>
> No, "option tcpka" only enables TCP-level keep-alives. The application
> layer cannot be aware of that. It just ensures that all components
> along the whole chain see traffic and don't close the connection (eg:
> firewalls). By default, TCP keepalives are quite rare, generally one
> every 2 hours.
Okay, now I understand.
I'm running jabber2 on the server side and have found the configuration settings in c2s.xml (specifically, 'keepalive') for enabling keep-alives (they appear to be disabled by default). So, I'll configure that for an appropriate value and make sure the timeouts in the haproxy listener are set accordingly.
> I'm sorry, but I know absolutely nothing about your protocol, so it's
> hard to help for your specific case. What I can suggest you however
> is to ensure that your "clitimeout" and "srvtimeout" are both equal,
> because when any of the two strikes, the connection will be terminated.
Ah, good to know. I'll probably set those timeouts to 5-10 seconds higher than the keep-alive to make sure no latency in sending/receiving the keep-alive causes the connection to be closed.
Many thanks for the suggestions!
Morgan
--- http://www.makkintosshu.com/Received on 2010/04/01 14:59
This archive was generated by hypermail 2.2.0 : 2010/04/01 15:15 CEST