From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: f9325,9de73eb3b41af3fc,start X-Google-Attributes: gidf9325,public X-Google-Thread: 11035d,9de73eb3b41af3fc,start X-Google-Attributes: gid11035d,public X-Google-Thread: 10669a,9de73eb3b41af3fc,start X-Google-Attributes: gid10669a,public X-Google-Thread: fcda7,9de73eb3b41af3fc,start X-Google-Attributes: gidfcda7,public X-Google-Thread: fa528,9de73eb3b41af3fc,start X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-01-22 11:00:02 PST Path: supernews.google.com!sn-xit-02!supernews.com!isdnet!195.25.12.36.MISMATCH!oleane.net!oleane!nnrp.oleane.net!not-for-mail From: francois reygagne Newsgroups: comp.protocols.tcp-ip,comp.unix.solaris,comp.os.linux.networking,comp.unix.tru64,comp.sys.hp.hpux Subject: TCP listen pending connection does not work as expected Date: Mon, 22 Jan 2001 19:58:36 +0100 Organization: opteway Message-ID: <3A6C82DC.E87E92CC@opteway.com> NNTP-Posting-Host: sophia1.opteway.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: s1.read.news.oleane.net 980189917 27888 195.101.210.209 (22 Jan 2001 18:58:37 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Mon, 22 Jan 2001 18:58:37 +0000 (UTC) X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-12 i686) X-Accept-Language: en Xref: supernews.google.com comp.protocols.tcp-ip:4564 comp.unix.solaris:27354 comp.os.linux.networking:27334 comp.unix.tru64:1531 comp.sys.hp.hpux:5827 I set the backlog parameter of listen to 2 to prevents from server congestion. I want the incoming client requests connect to be rejected i.e. refused by tcp when the listen queue is full. The max number of tcp pending connections feature does not exist anymore for the kernel 2.2 and 2.4; Anyway it's possible via a root system command to enable it on Linux; I use for that the root command as follow: echo 1 > /proc/sys/net/ipv4/tcp_abort_on-overflow on linux 2.2.14-12. but tcp stack accepts all connection and resets them after !!! My client receives connection reset by peer when receiving data !! Normally the tcp stack should work as bellow ? Once the backlog queuebecomes full, no further connection requests will be accepted for that service until an entry becomes available in the queue. Under normal conditions, if a connection request is made and the queue is full, TCP relies on the client to retransmit the connection request at some later stage. Generally speaking, TCP is quite expedient in processing connection requests and so, unless the service is particularly busy, a retransmitted request should be processed. Could anyone help me. I want to make tcp rejected my incoming request when the tcp listen queue is full on Linux, Solaris 2.8, Tru64, HP-UX and AIX. I have a workaround exposed here after but this solution seems to me quick and dirty. Define a threshold of max pending connections the server handles * server accepts all connection and pushes the created client socket into a fifo queue of pending connection until the fifo becomes full * when max of pending connection is reached, the server stops pushing client socket 1) reads client request then 2) sends a response to refuse the request (server too busy) 3)closes the connection -- Fran�ois REYGAGNE opt[e]way S.A., 2881 route des Cr�tes, BP308 06906 Sophia Antipolis Cedex, FRANCE t�l: +33 (0)4 92 95 27 01 fax: +33 (0)4 92 95 26 01