Return-Path: X-Original-To: apmail-james-server-user-archive@www.apache.org Delivered-To: apmail-james-server-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C66B4DCDA for ; Tue, 12 Feb 2013 06:47:08 +0000 (UTC) Received: (qmail 64528 invoked by uid 500); 12 Feb 2013 06:47:08 -0000 Delivered-To: apmail-james-server-user-archive@james.apache.org Received: (qmail 63918 invoked by uid 500); 12 Feb 2013 06:47:00 -0000 Mailing-List: contact server-user-help@james.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "James Users List" Reply-To: "James Users List" Delivered-To: mailing list server-user@james.apache.org Received: (qmail 63268 invoked by uid 99); 12 Feb 2013 06:46:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2013 06:46:56 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [91.183.38.48] (HELO srv1.aos.io) (91.183.38.48) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2013 06:46:50 +0000 MIME-Version: 1.0 X-UserIsAuth: true Received: from cpc8-acto4-2-0-cust617.4-2.cable.virginmedia.com (EHLO [192.168.0.2]) ([82.28.198.106]) by srv1.aos.io (JAMES SMTP Server ) with ESMTPA ID 7937972; Tue, 12 Feb 2013 07:46:28 +0100 (CET) Message-ID: <5119E542.40708@apache.org> Date: Tue, 12 Feb 2013 06:46:26 +0000 From: Eric Charles User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:19.0) Gecko/20130117 Thunderbird/19.0 To: James Users List Subject: Re: Using connectionBacklog References: <511920A9.5000004@nitorgroup.com> In-Reply-To: <511920A9.5000004@nitorgroup.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, If you set backlog=1, the socket can not queue more than one request at a time. So if the socket is already busy with one connection, a second connection request will be simply rejected. The backlog property is given to netty for its bootstrap. The connectionLimit is implemented with Netty handlers which rejects connection if you have already more open connection than the given number. Thx, Eric On 11/02/2013 16:47, Phillip Odam wrote: > Can anyone confirm successful use of connectionBacklog for the smtp > service on james 3.0 beta4 (or any v3). Successful use of > connectionBacklog for any of the other services e.g. imap, lmtp and pop3 > is also of interest as under the covers the code is all common. > > Firstly I gather the connectionBacklog setting is controlling the > backlog just as is done in > http://docs.oracle.com/javase/6/docs/api/java/net/ServerSocket.html > > Secondly comparing the code > - > http://svn.apache.org/repos/asf/james/protocols/trunk/netty/src/main/java/org/apache/james/protocols/netty/AbstractAsyncServer.java > > - > http://svn.apache.org/repos/asf/james/protocols/tags/protocols-1.6.2/netty/src/main/java/org/apache/james/protocols/netty/AbstractAsyncServer.java > > > reports no differences so apart from the different versions of netty > between beta4 and where beta5 development is there should be no > difference with the backlog between beta4 and the current development > stream. > > > Changing the connectionBacklog value does cause the startup log entry > (SMTP Service connection backlog is: XXX) to change accordingly, however... > > SETUP > ----- > > connectionBacklog = 1 > connectionLimit = 1 > > TESTING > ------- > > With two command lines, use telnet to connect to the smtp service, the > first telnet instance will establish a connection. > > The second instance reports back immediately that a connection can not > be established, whereas I would expect the second instance to hang and > either establish a connection when the first telnet instance disconnects > or a timeout occurs. > > > Testing thus far has not been in a controlled environment so the backlog > issue may well not be with james, but before I go much further I wanted > to see what anyone else out there is seeing. > > Thanks > Phillip > > --------------------------------------------------------------------- > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org > For additional commands, e-mail: server-user-help@james.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org For additional commands, e-mail: server-user-help@james.apache.org