You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ji...@apache.org on 2004/05/12 17:08:56 UTC

[jira] Created: (JAMES-283) James should use default backLog value when creating a ServerSocket

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-283

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-283
    Summary: James should use default backLog value when creating a ServerSocket
       Type: Improvement

     Status: Unassigned
   Priority: Major

    Project: James
 Components: 
             James Core
   Versions:
             2.2.0RC3

   Assignee: 
   Reporter: Hes Siemelink

    Created: Wed, 12 May 2004 8:08 AM
    Updated: Wed, 12 May 2004 8:08 AM

Description:
We have a test where we send 100 messages simultaneously. James does not handle this well. With a standard setup 40-70 messages are NOT handled. After tweaking the config file (allocating more threads and connections) still 10-30 messages are not picked up.

We discovered that James specifies a very tight 'backLog' value when creating a ServerSocket. This happens in org.apache.james.core.AbstractJamesService.initialize() on line 302:

  ServerSocket serverSocket = factory.createServerSocket(port, 5, bindTo);

(Sorry no time to do a proper diff)

We suppose that eventually a java.net.ServerSocket is created with this value. According to the javadoc of ServerSocket, the default value is 50. This can be specified by setting the backLog parameter to 0. See http://java.sun.com/j2se/1.4.2/docs/api/java/net/ServerSocket.html

We changed the above line in AbstractJamesService to

  ServerSocket serverSocket = factory.createServerSocket(port, 0, bindTo);

With this fix all 100 messages are accepted (on Windows 2000 Server).

We advise that James uses the default value for the backLog parameter. If there is a special reason why the default value should be 5, please make it a parameter we can specify in the config file.

Thanks

    Hes.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Resolved: (JAMES-283) James should use default backLog value when creating a ServerSocket

Posted by ji...@apache.org.
Message:

   The following issue has been resolved as FIXED.

   Resolver: Noel J. Bergman
       Date: Wed, 19 May 2004 3:41 PM

Patch is included in the DB-TEST build, and will be in the RC4 build.
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-283

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-283
    Summary: James should use default backLog value when creating a ServerSocket
       Type: Improvement

     Status: Resolved
   Priority: Major
 Resolution: FIXED

    Project: James
 Components: 
             James Core
   Fix Fors:
             2.2.0RC4
   Versions:
             2.2.0RC3

   Assignee: 
   Reporter: Hes Siemelink

    Created: Wed, 12 May 2004 8:08 AM
    Updated: Wed, 19 May 2004 3:41 PM

Description:
We have a test where we send 100 messages simultaneously. James does not handle this well. With a standard setup 40-70 messages are NOT handled. After tweaking the config file (allocating more threads and connections) still 10-30 messages are not picked up.

We discovered that James specifies a very tight 'backLog' value when creating a ServerSocket. This happens in org.apache.james.core.AbstractJamesService.initialize() on line 302:

  ServerSocket serverSocket = factory.createServerSocket(port, 5, bindTo);

(Sorry no time to do a proper diff)

We suppose that eventually a java.net.ServerSocket is created with this value. According to the javadoc of ServerSocket, the default value is 50. This can be specified by setting the backLog parameter to 0. See http://java.sun.com/j2se/1.4.2/docs/api/java/net/ServerSocket.html

We changed the above line in AbstractJamesService to

  ServerSocket serverSocket = factory.createServerSocket(port, 0, bindTo);

With this fix all 100 messages are accepted (on Windows 2000 Server).

We advise that James uses the default value for the backLog parameter. If there is a special reason why the default value should be 5, please make it a parameter we can specify in the config file.

Thanks

    Hes.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Updated: (JAMES-283) James should use default backLog value when creating a ServerSocket

Posted by ji...@apache.org.
The following issue has been updated:

    Updater: Noel J. Bergman (mailto:noel@devtech.com)
       Date: Wed, 12 May 2004 10:44 AM
    Comment:
Patch to add configurable connection backlog.
    Changes:
             Attachment changed to backlog-patch.txt
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/JAMES-283?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-283

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-283
    Summary: James should use default backLog value when creating a ServerSocket
       Type: Improvement

     Status: Unassigned
   Priority: Major

    Project: James
 Components: 
             James Core
   Versions:
             2.2.0RC3

   Assignee: 
   Reporter: Hes Siemelink

    Created: Wed, 12 May 2004 8:08 AM
    Updated: Wed, 12 May 2004 10:44 AM

Description:
We have a test where we send 100 messages simultaneously. James does not handle this well. With a standard setup 40-70 messages are NOT handled. After tweaking the config file (allocating more threads and connections) still 10-30 messages are not picked up.

We discovered that James specifies a very tight 'backLog' value when creating a ServerSocket. This happens in org.apache.james.core.AbstractJamesService.initialize() on line 302:

  ServerSocket serverSocket = factory.createServerSocket(port, 5, bindTo);

(Sorry no time to do a proper diff)

We suppose that eventually a java.net.ServerSocket is created with this value. According to the javadoc of ServerSocket, the default value is 50. This can be specified by setting the backLog parameter to 0. See http://java.sun.com/j2se/1.4.2/docs/api/java/net/ServerSocket.html

We changed the above line in AbstractJamesService to

  ServerSocket serverSocket = factory.createServerSocket(port, 0, bindTo);

With this fix all 100 messages are accepted (on Windows 2000 Server).

We advise that James uses the default value for the backLog parameter. If there is a special reason why the default value should be 5, please make it a parameter we can specify in the config file.

Thanks

    Hes.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Closed: (JAMES-283) James should use default backLog value when creating a ServerSocket

Posted by ji...@apache.org.
Message:

   The following issue has been closed.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-283

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-283
    Summary: James should use default backLog value when creating a ServerSocket
       Type: Improvement

     Status: Closed
   Priority: Major
 Resolution: FIXED

    Project: James
 Components: 
             James Core
   Fix Fors:
             2.2.0RC4
   Versions:
             2.2.0RC3

   Assignee: Noel J. Bergman
   Reporter: Hes Siemelink

    Created: Wed, 12 May 2004 8:08 AM
    Updated: Fri, 21 May 2004 10:12 PM

Description:
We have a test where we send 100 messages simultaneously. James does not handle this well. With a standard setup 40-70 messages are NOT handled. After tweaking the config file (allocating more threads and connections) still 10-30 messages are not picked up.

We discovered that James specifies a very tight 'backLog' value when creating a ServerSocket. This happens in org.apache.james.core.AbstractJamesService.initialize() on line 302:

  ServerSocket serverSocket = factory.createServerSocket(port, 5, bindTo);

(Sorry no time to do a proper diff)

We suppose that eventually a java.net.ServerSocket is created with this value. According to the javadoc of ServerSocket, the default value is 50. This can be specified by setting the backLog parameter to 0. See http://java.sun.com/j2se/1.4.2/docs/api/java/net/ServerSocket.html

We changed the above line in AbstractJamesService to

  ServerSocket serverSocket = factory.createServerSocket(port, 0, bindTo);

With this fix all 100 messages are accepted (on Windows 2000 Server).

We advise that James uses the default value for the backLog parameter. If there is a special reason why the default value should be 5, please make it a parameter we can specify in the config file.

Thanks

    Hes.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-283) James should use default backLog value when creating a ServerSocket

Posted by ji...@apache.org.
The following comment has been added to this issue:

     Author: Hes Siemelink
    Created: Wed, 19 May 2004 5:41 AM
       Body:
Seems to work fine!

Will this patch be included in the 2.2.0 release?
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/JAMES-283?page=comments#action_35614

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-283

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-283
    Summary: James should use default backLog value when creating a ServerSocket
       Type: Improvement

     Status: Unassigned
   Priority: Major

    Project: James
 Components: 
             James Core
   Versions:
             2.2.0RC3

   Assignee: 
   Reporter: Hes Siemelink

    Created: Wed, 12 May 2004 8:08 AM
    Updated: Wed, 19 May 2004 5:41 AM

Description:
We have a test where we send 100 messages simultaneously. James does not handle this well. With a standard setup 40-70 messages are NOT handled. After tweaking the config file (allocating more threads and connections) still 10-30 messages are not picked up.

We discovered that James specifies a very tight 'backLog' value when creating a ServerSocket. This happens in org.apache.james.core.AbstractJamesService.initialize() on line 302:

  ServerSocket serverSocket = factory.createServerSocket(port, 5, bindTo);

(Sorry no time to do a proper diff)

We suppose that eventually a java.net.ServerSocket is created with this value. According to the javadoc of ServerSocket, the default value is 50. This can be specified by setting the backLog parameter to 0. See http://java.sun.com/j2se/1.4.2/docs/api/java/net/ServerSocket.html

We changed the above line in AbstractJamesService to

  ServerSocket serverSocket = factory.createServerSocket(port, 0, bindTo);

With this fix all 100 messages are accepted (on Windows 2000 Server).

We advise that James uses the default value for the backLog parameter. If there is a special reason why the default value should be 5, please make it a parameter we can specify in the config file.

Thanks

    Hes.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-283) James should use default backLog value when creating a ServerSocket

Posted by ji...@apache.org.
The following comment has been added to this issue:

     Author: Noel J. Bergman
    Created: Wed, 12 May 2004 10:42 AM
       Body:
I agree that a change should be made, but am reluctant to change the backlog value at this late date without putting the release through testing again.  There is a certain amount of platform dependency to this issue.  For example, linux systems that use SYN_COOKIES to guard against a syn flood attack will not see this problem.

However, I have modified the code to allow a <connectionBacklog> element, which currently defaults to the internal value of 5, and would be willing to vote for that change to go into the 2.2.0 release, since it does not change the default behavior.

Please review the attached patch ASAP, and let us know if it resolves your problem.  You'll want to an add <connectionBacklog> element to your <smtpserver> configuration.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/JAMES-283?page=comments#action_35506

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-283

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-283
    Summary: James should use default backLog value when creating a ServerSocket
       Type: Improvement

     Status: Unassigned
   Priority: Major

    Project: James
 Components: 
             James Core
   Versions:
             2.2.0RC3

   Assignee: 
   Reporter: Hes Siemelink

    Created: Wed, 12 May 2004 8:08 AM
    Updated: Wed, 12 May 2004 10:42 AM

Description:
We have a test where we send 100 messages simultaneously. James does not handle this well. With a standard setup 40-70 messages are NOT handled. After tweaking the config file (allocating more threads and connections) still 10-30 messages are not picked up.

We discovered that James specifies a very tight 'backLog' value when creating a ServerSocket. This happens in org.apache.james.core.AbstractJamesService.initialize() on line 302:

  ServerSocket serverSocket = factory.createServerSocket(port, 5, bindTo);

(Sorry no time to do a proper diff)

We suppose that eventually a java.net.ServerSocket is created with this value. According to the javadoc of ServerSocket, the default value is 50. This can be specified by setting the backLog parameter to 0. See http://java.sun.com/j2se/1.4.2/docs/api/java/net/ServerSocket.html

We changed the above line in AbstractJamesService to

  ServerSocket serverSocket = factory.createServerSocket(port, 0, bindTo);

With this fix all 100 messages are accepted (on Windows 2000 Server).

We advise that James uses the default value for the backLog parameter. If there is a special reason why the default value should be 5, please make it a parameter we can specify in the config file.

Thanks

    Hes.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-283) James should use default backLog value when creating a ServerSocket

Posted by ji...@apache.org.
The following comment has been added to this issue:

     Author: Hes Siemelink
    Created: Thu, 13 May 2004 12:06 PM
       Body:
Noel, thanks for the rapid response & fix.

I agree that the default value should not be changed for the upcoming release.

I'm afraid the first opportunity that I can test the patch is Tuesday. 
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/JAMES-283?page=comments#action_35531

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-283

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-283
    Summary: James should use default backLog value when creating a ServerSocket
       Type: Improvement

     Status: Unassigned
   Priority: Major

    Project: James
 Components: 
             James Core
   Versions:
             2.2.0RC3

   Assignee: 
   Reporter: Hes Siemelink

    Created: Wed, 12 May 2004 8:08 AM
    Updated: Thu, 13 May 2004 12:06 PM

Description:
We have a test where we send 100 messages simultaneously. James does not handle this well. With a standard setup 40-70 messages are NOT handled. After tweaking the config file (allocating more threads and connections) still 10-30 messages are not picked up.

We discovered that James specifies a very tight 'backLog' value when creating a ServerSocket. This happens in org.apache.james.core.AbstractJamesService.initialize() on line 302:

  ServerSocket serverSocket = factory.createServerSocket(port, 5, bindTo);

(Sorry no time to do a proper diff)

We suppose that eventually a java.net.ServerSocket is created with this value. According to the javadoc of ServerSocket, the default value is 50. This can be specified by setting the backLog parameter to 0. See http://java.sun.com/j2se/1.4.2/docs/api/java/net/ServerSocket.html

We changed the above line in AbstractJamesService to

  ServerSocket serverSocket = factory.createServerSocket(port, 0, bindTo);

With this fix all 100 messages are accepted (on Windows 2000 Server).

We advise that James uses the default value for the backLog parameter. If there is a special reason why the default value should be 5, please make it a parameter we can specify in the config file.

Thanks

    Hes.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org