From c035bcd6b20063d79aaf270c19beed476dcb5c05 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Mon, 10 Feb 2014 13:48:12 -0800 Subject: [PATCH] JCLOUDS-459: Limit maximum user threads Previously jclouds could use an unlimited number of threads on its user ExecutorService. While this ExecutorService will go away when we complete deasyncafication, we should prevent jclouds from misbehaving until that time. --- .../main/java/org/jclouds/apis/internal/BaseApiMetadata.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/jclouds/apis/internal/BaseApiMetadata.java b/core/src/main/java/org/jclouds/apis/internal/BaseApiMetadata.java index 66a9110615..a814c613eb 100644 --- a/core/src/main/java/org/jclouds/apis/internal/BaseApiMetadata.java +++ b/core/src/main/java/org/jclouds/apis/internal/BaseApiMetadata.java @@ -66,7 +66,8 @@ public abstract class BaseApiMetadata implements ApiMetadata { props.setProperty(PROPERTY_SO_TIMEOUT, 60000 + ""); props.setProperty(PROPERTY_CONNECTION_TIMEOUT, 60000 + ""); props.setProperty(PROPERTY_IO_WORKER_THREADS, 20 + ""); - props.setProperty(PROPERTY_USER_THREADS, 0 + ""); + // Successfully tested 50 user threads with BlobStore.clearContainer. + props.setProperty(PROPERTY_USER_THREADS, 50 + ""); props.setProperty(PROPERTY_SCHEDULER_THREADS, 10 + ""); props.setProperty(PROPERTY_MAX_CONNECTION_REUSE, 75 + ""); props.setProperty(PROPERTY_MAX_SESSION_FAILURES, 2 + "");