LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: connection state lifetime

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: connection state lifetime
From: Roberto Nibali <ratz@xxxxxxxxxxxx>
Date: Fri, 12 Sep 2003 00:48:58 +0200
Hello,

we're using LVS/DR in front of an IMAP service.  it is common for IMAP
clients to leave the connection open but idle, typically the IMAP
server will throw out clients after half an hour.

True.

unfortunately, LVS doesn't keep state that long, so if the connection
is idle for a while (12 minutes?), the client will get a RST the next
time it tries to talk to the server.

If it's not persistent, yes.

I tried looking in the HOWTO, and found something about using
Netfilter's conntrack, but

  # modprobe ip_conntrack hashsize=131072

This is the connection tracking hash size which has absolutely nothing to do with LVS, I'm afraid.

doesn't fix my problem.  neither does

  # echo 2000 > /proc/sys/net/ipv4/vs/timeout_established

(I left the connection idle for a little more than 15 minutes when
testing.)

Well, the state after a successful request immediately goes into timewait or closewait, so you might want to fiddle with those values. However it's not such a good idea to do this.

is it possible to increase this timeout value?  I don't want to use
persistence if I can help it.

Try it with the closewait and timewait ones. To get a nice overview you can use following scriptlet:

for i in  /proc/sys/net/ipv4/vs/timeout_*; do
    printf "%-20s:%3s\n" "${i##*/}" "$(cat $i)"
done

To get the masquerading timeouts you can invoke ipvsadm like follows:

ipvsadm -L -n -c

Best regards,
Roberto Nibali, ratz
--
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq'|dc

<Prev in Thread] Current Thread [Next in Thread>