diff --git a/cws-engine-service/src/main/java/jpl/cws/engine/WorkerService.java b/cws-engine-service/src/main/java/jpl/cws/engine/WorkerService.java index 17e58997..e465d307 100644 --- a/cws-engine-service/src/main/java/jpl/cws/engine/WorkerService.java +++ b/cws-engine-service/src/main/java/jpl/cws/engine/WorkerService.java @@ -895,7 +895,8 @@ public boolean syncCounters(String reason) { public void setJobExecutorMaxPoolSize(Integer executorServiceMaxPoolSize, boolean doDbUpdate) { if (executorServiceMaxPoolSize != null) { try { - + // we are getting errors if we go beyond 10? + executorServiceMaxPoolSize = Math.max(10, executorServiceMaxPoolSize); // Log information about JMX remote interface if (System.getProperty("com.sun.management.jmxremote") == null) { log.warn("JMX remote appears to be disabled"); @@ -922,7 +923,7 @@ public void setJobExecutorMaxPoolSize(Integer executorServiceMaxPoolSize, boolea // Through experimentation, we have seen that the max doesn't get reached, but // its the core size that counts. // - Attribute attr2 = new Attribute("CorePoolSize", executorServiceMaxPoolSize); + Attribute attr2 = new Attribute("CorePoolSize", 10); mbsc.setAttribute(serviceName, attr2); // Also set the MaximumPoolSize