tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 57936] New: Wrong handling of acceptorThreadCount
Date Tue, 19 May 2015 14:24:07 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=57936

            Bug ID: 57936
           Summary: Wrong handling of acceptorThreadCount
           Product: Tomcat 8
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Util
          Assignee: dev@tomcat.apache.org
          Reporter: oliver@kant.net

According to
https://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
there is a statement saying that if the acceptorThreadCount is 0, it is being
set to 1 since NIO2 does not allow any form of IO concurrency.

Setting the acceptorThreadCount to 2 in server.xml will throw an error ("Socket
accept failed"). Wouldn't it be better to change the code

        // Initialize thread count defaults for acceptor, poller
        if (acceptorThreadCount == 0) {
            // NIO2 does not allow any form of IO concurrency
            acceptorThreadCount = 1;
        }

into

        // Initialize thread count defaults for acceptor, poller
        if (acceptorThreadCount != 1) {
            // NIO2 does not allow any form of IO concurrency
            acceptorThreadCount = 1;
        }

to avoid this behaviour?

Thanks,
Oliver

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


Mime
View raw message