XML-RPC

WebServer concurrent request limit is off by one

Created: 28/Nov/08 03:05 AM   Updated: 29/Apr/09 08:03 PM
Return to search
Component/s: None
Affects Version/s: 3.1.1
Fix Version/s: 3.1.2

Time Tracking:
Not Specified

Resolution Date: 28/Nov/08 08:58 PM


 Description  « Hide
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;


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jochen Wiedmann made changes - 28/Nov/08 08:58 PM
Field Original Value New Value
Fix Version/s 3.1.2 [ 12313538 ]
Fix Version/s unspecified [ 10490 ]
Assignee Jochen Wiedmann [ jochen@apache.org ]
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Jochen Wiedmann made changes - 29/Apr/09 08:03 PM
Status Resolved [ 5 ] Closed [ 6 ]