Uploaded image for project: 'XML-RPC'
  1. XML-RPC
  2. XMLRPC-161

WebServer concurrent request limit is off by one

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.1
    • 3.1.2
    • None
    • None

    Description

      If thread limit is set to N, N+1 requests can be processed simmultaneousely. Every time the limit is crossed a new thread is created for the N+1st request and is destroyed after the processing is finished.

      Proposed patch:

      Index: /var/opt/apachews/trunk/common/src/main/java/org/apache/xmlrpc/util/ThreadPool.java
      ===================================================================
      — /var/opt/apachews/trunk/common/src/main/java/org/apache/xmlrpc/util/ThreadPool.java (revision 720508)
      +++ /var/opt/apachews/trunk/common/src/main/java/org/apache/xmlrpc/util/ThreadPool.java (working copy)
      @@ -153,7 +153,7 @@

      • might consider to use the {@link #addTask(ThreadPool.Task)}

        method instead.
        */
        public synchronized boolean startTask(Task pTask) {

      • if (maxSize != 0 && runningThreads.size() > maxSize) {
        + if (maxSize != 0 && runningThreads.size() >= maxSize) { return false; }

        Poolable poolable;

      Attachments

        Activity

          People

            jochen@apache.org Jochen Wiedmann
            gertsvolf Mark Gertsvolf
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: