Re: Possible problem with ACCEPT/CONNECT in

From: Meelis Roos (mroos@linux.ee)
Date: Fri Apr 07 2000 - 05:53:08 EST


PZ> The problem is then many clients are trying to connect the same port, they
PZ> sometimes get locked for a long time even then CPU usage on server is low
PZ> and it is able to do needed number of accepts in a time.
PZ> The problem persists the client and server are on the same or on different
PZ> machines, and even then number of server processes doing accept() is grater
PZ> then the number of clients running.
PZ> The next strange the times taken by connect() - if it does not pass
PZ> momentaly it gots locked for 3 9 21 45 ... seconds.

Try to increase the local port range on the clients. Otherwise you may
get stuck on port reuse timeouts. Each combination (source ip,
source port, dest ip, dest port) is reserverd for MAX_TTL seconds before
it can be reused in the Internet because there may be some packets left
from the previous connections that are traveling around and that reach
the destination after the connection has been closed. These packets may
break the protocol. So there's a delay of 255 s to make sure all the
packets have died. SO_REUSEADDR may also affect the behaviour if this is
the problem.

-- 
Meelis Roos (mroos@tartu.cyber.ee)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:18 EST