You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by ji...@apache.org on 2004/02/20 09:21:52 UTC

[jira] Closed: (DIR-18) Prevent phantom connections

Message:

   The following issue has been closed.

   Resolver: Alex Karasulu
       Date: Fri, 20 Feb 2004 12:21 AM

Found a workaround for this nasty behavior - simply blow away keys that were not selected but came up in the selection list.  Basically select() returned 0 but a bunch of selection keys are in the selected set.  These keys are most likely phantoms.  Here are the diffs in cvs for this change:

http://cvs.apache.org/viewcvs.cgi/incubator/directory/eve/trunk/eve/frontend/input/pojo-impl/src/java/org/apache/eve/input/DefaultInputManager.java?r1=6770&r2=6790&p1=incubator/directory/eve/trunk/eve/frontend/input/pojo-impl/src/java/org/apache/eve/input/DefaultInputManager.java&p2=incubator/directory/eve/trunk/eve/frontend/input/pojo-impl/src/java/org/apache/eve/input/DefaultInputManager.java&diff_format=h&root=Apache-SVN


---------------------------------------------------------------------
View the issue:
  http://nagoya.apache.org/jira/secure/ViewIssue.jspa?key=DIR-18

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: DIR-18
    Summary: Prevent phantom connections
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

    Project: Directory
 Components: 
             Eve

   Assignee: Alex Karasulu
   Reporter: Alex Karasulu

    Created: Thu, 19 Feb 2004 11:28 PM
    Updated: Fri, 20 Feb 2004 12:21 AM

Description:
Some clients will never propery cleanup after themselves.  This can under heavy load create problems.  The server's input selector seems to think these phantom channels are ready all the time and returns immediately from all select calls.  So a single phantom client will leave you chewing up the CPU.  The client channel often does not exhibit proper behavoir where the channel.read should return -1 for and EOF.  This may actually take some time for the timeout to take effect.

The key here is to find selector keys that keep triggering select to return immediately.  Check the channels of the selectors to see if they are writable to for example and cancel them if they are not.  This is a really bad work around but for now that's one option.



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

If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.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