tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Rossbach ...@objektpark.de>
Subject Re: svn commit: r493480 - /tomcat/connectors/trunk/jk/java/org/apache/jk/common/ChannelSocket.java
Date Sun, 07 Jan 2007 09:16:22 GMT
I agree with you, but at apache takeover the backlog can be helpfull,  
and default is 0 as before.

Regards
Peter

Am 07.01.2007 um 00:15 schrieb Bill Barker:

>
> "Filip Hanik - Dev Lists" <devlists@hanik.com> wrote in message
> news:45A02A9E.4010304@hanik.com...
>> ok,  this is hella confusing.  :)
>> the AJP is supposed to be a persistent protocol, so why would we  
>> have a
>> backlog on the listener?
>> ie, the connections can potentially not close at all in an ideal  
>> world,
>> yet you would accept connections and never do anything with them?
>>
>
> I agree that setting the backlog on the AJP Connector is pretty  
> pointless.
> I suppose that it might be possible to have a setup where Httpd can  
> flood
> Tomcat with new requests faster than it can handle accepts, but at  
> worst it
> would only be at startup.  However, the worst that the patch does  
> is let a
> clueless sysadm shoot herself in the foot :).
>
>> Filip
>>
>> pero@apache.org wrote:
>>> Author: pero
>>> Date: Sat Jan  6 06:34:51 2007
>>> New Revision: 493480
>>>
>>> URL: http://svn.apache.org/viewvc?view=rev&rev=493480
>>> Log:
>>> Add backlog attribute to ChannelSocket
>>>
>>> Modified:
>>>
>>> tomcat/connectors/trunk/jk/java/org/apache/jk/common/ 
>>> ChannelSocket.java
>>>
>>> Modified:
>>> tomcat/connectors/trunk/jk/java/org/apache/jk/common/ 
>>> ChannelSocket.java
>>> URL:
>>> http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/java/org/ 
>>> apache/jk/common/ChannelSocket.java? 
>>> view=diff&rev=493480&r1=493479&r2=493480
>>> ==================================================================== 
>>> ==========
>>> ---
>>> tomcat/connectors/trunk/jk/java/org/apache/jk/common/ 
>>> ChannelSocket.java
>>> (original)
>>> +++
>>> tomcat/connectors/trunk/jk/java/org/apache/jk/common/ 
>>> ChannelSocket.java
>>> Sat Jan  6 06:34:51 2007
>>> @@ -82,6 +82,7 @@
>>>      private int startPort=8009;
>>>      private int maxPort=8019; // 0 for backward compat.
>>>      private int port=startPort;
>>> +    private int backlog = 0;
>>>      private InetAddress inet;
>>>      private int serverTimeout;
>>>      private boolean tcpNoDelay=true; // nodelay to true by default
>>> @@ -263,12 +264,16 @@
>>>      }
>>>  public int getMaxSpareThreads() {
>>> -        return tp.getMaxSpareThreads();   +        return
>>> tp.getMaxSpareThreads();
>>>      }
>>>  public void setBacklog(int i) {
>>> +        this.backlog = i;
>>>      }
>>> -    +  +    public int getBacklog() {
>>> +        return backlog;
>>> +    }    /* ==================== ==================== */
>>>      ServerSocket sSocket;
>>> @@ -367,9 +372,9 @@
>>>          for( int i=startPort; i<=maxPort; i++ ) {
>>>              try {
>>>                  if( inet == null ) {
>>> -                    sSocket = new ServerSocket( i, 0 );
>>> +                    sSocket = new ServerSocket( i, backlog );
>>>                  } else {
>>> -                    sSocket=new ServerSocket( i, 0, inet );
>>> +                    sSocket=new ServerSocket( i, backlog, inet );
>>>                  }
>>>                  port=i;
>>>                  break;
>>>
>>>
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message