Netflix/Hystrix · error · HystrixPropertyException
Failed to set Thread Pool properties. {}
Error message
Failed to set Thread Pool properties. {} What it means
Thrown by the Javanica (annotation-based) GenericSetterBuilder when @HystrixCommand's threadPoolProperties attribute contains an entry that HystrixPropertiesManager cannot convert into a HystrixThreadPoolProperties.Setter (e.g. an unknown property name or a value that fails int/boolean parsing). The underlying IllegalArgumentException is caught, wrapped in HystrixPropertyException, and annotated with groupKey/commandKey/threadPoolKey via getInfo() so you can identify which command misconfigured it. It is raised at command-setter build time, i.e. the first time the annotated method is invoked.
Source
Thrown at hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/command/GenericSetterBuilder.java:83
}
/**
* Creates instance of {@link HystrixCommand.Setter}.
*
* @return the instance of {@link HystrixCommand.Setter}
*/
public HystrixCommand.Setter build() throws HystrixPropertyException {
HystrixCommand.Setter setter = HystrixCommand.Setter
.withGroupKey(HystrixCommandGroupKey.Factory.asKey(groupKey))
.andCommandKey(HystrixCommandKey.Factory.asKey(commandKey));
if (StringUtils.isNotBlank(threadPoolKey)) {
setter.andThreadPoolKey(HystrixThreadPoolKey.Factory.asKey(threadPoolKey));
}
try {
setter.andThreadPoolPropertiesDefaults(HystrixPropertiesManager.initializeThreadPoolProperties(threadPoolProperties));
} catch (IllegalArgumentException e) {
throw new HystrixPropertyException("Failed to set Thread Pool properties. " + getInfo(), e);
}
try {
setter.andCommandPropertiesDefaults(HystrixPropertiesManager.initializeCommandProperties(commandProperties));
} catch (IllegalArgumentException e) {
throw new HystrixPropertyException("Failed to set Command properties. " + getInfo(), e);
}
return setter;
}
// todo dmgcodevil: it would be better to reuse the code from build() method
public HystrixObservableCommand.Setter buildObservableCommandSetter() {
HystrixObservableCommand.Setter setter = HystrixObservableCommand.Setter
.withGroupKey(HystrixCommandGroupKey.Factory.asKey(groupKey))
.andCommandKey(HystrixCommandKey.Factory.asKey(commandKey));
try {
setter.andCommandPropertiesDefaults(HystrixPropertiesManager.initializeCommandProperties(commandProperties));
} catch (IllegalArgumentException e) {
throw new HystrixPropertyException("Failed to set Command properties. " + getInfo(), e);View on GitHub (pinned to 5ce3bc58c3)
Solutions
- Check the exception's getInfo() output (groupKey/commandKey/threadPoolKey) to find the offending @HystrixCommand method
- Verify every @HystrixProperty name under threadPoolProperties against HystrixPropertiesManager's THREAD_POOL_PROP_MAP (coreSize, maximumSize, keepAliveTimeMinutes, maxQueueSize, queueSizeRejectionThreshold, metrics.rollingStats.timeInMilliseconds, etc.)
- Verify each value parses as the expected type (int/boolean) — e.g. use "10" not "ten"
- Remove or correct the invalid property and restart; the error is deterministic, not transient
Example fix
// before
@HystrixCommand(threadPoolProperties = {
@HystrixProperty(name = "coreSize", value = "ten")
})
public String call() { ... }
// after
@HystrixCommand(threadPoolProperties = {
@HystrixProperty(name = "coreSize", value = "10")
})
public String call() { ... } Defensive patterns
Strategy: validation
Validate before calling
Set<String> VALID_TP = new HashSet<>(Arrays.asList(
"coreSize", "maximumSize", "keepAliveTimeMinutes", "maxQueueSize",
"queueSizeRejectionThreshold", "allowMaximumSizeToDivergeFromCoreSize",
"metrics.rollingStats.timeInMilliseconds", "metrics.rollingStats.numBuckets"));
// in a startup check, for each annotated method:
HystrixCommand ann = m.getAnnotation(HystrixCommand.class);
if (ann != null) {
for (HystrixProperty p : ann.threadPoolProperties()) {
if (!VALID_TP.contains(p.name()))
throw new IllegalStateException(m + " invalid threadPool property " + p.name());
}
} Try / catch
catch (HystrixPropertyException e) { log.error("Bad threadPoolProperties on command", e); /* fail startup — config error is deterministic */ } Prevention
- Centralize @HystrixProperty name/value constants instead of inline strings
- Add a startup reflection scan validating all @HystrixCommand annotations
- Keep property names in one place per version; re-verify after Hystrix upgrades
When it happens
Trigger: Declaring @HystrixCommand(threadPoolProperties = { @HystrixProperty(name = "coreSize", value = "ten") }) or using a property name that is not in the thread-pool property map (coreSize, maximumSize, keepAliveTimeMinutes, maxQueueSize, queueSizeRejectionThreshold, allowMaximumSizeToDivergeFromCoreSize, metrics.rollingStats.*) on a method whose setter is being built.
Common situations: Typos in property names in annotations; copying command-properties names (execution.isolation.thread.timeoutInMilliseconds) into threadPoolProperties; passing non-numeric strings for integer properties after refactoring a value from an externalized config string.
Related errors
- Failed to set Command properties. {}
- method cannot be annotated with HystrixCommand and HystrixCo
- batch method must be annotated with HystrixCommand annotatio
- unknown {} property: {}
- bad property value. property name '{}'. Expected int value,
AI-assisted analysis of Netflix/Hystrix@5ce3bc58c3 (2026-08-14).
Data as JSON: /api/errors/83c9a3b1b3b7608e.
Report an issue: GitHub.