{"record":{"id":"0c2e5d83f2e8c843","repo":"apache/druid","slug":"ohh-no-unusedconnectiontimeout-s-is-longer-than","errorCode":null,"errorMessage":"Ohh no! UnusedConnectionTimeout[%s] is longer than readTimeout[%s], please correct the configuration, this might not be supported in future.","messagePattern":"Ohh no! UnusedConnectionTimeout\\[(.+?)\\] is longer than readTimeout\\[(.+?)\\], please correct the configuration, this might not be supported in future\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"server/src/main/java/org/apache/druid/guice/http/DruidHttpClientConfig.java","lineNumber":113,"sourceCode":"  {\n    return compressionCodec;\n  }\n\n  public int getNumRequestsQueued()\n  {\n    return numRequestsQueued;\n  }\n\n  public int getRequestBuffersize()\n  {\n    return requestBuffersize;\n  }\n\n  public Duration getUnusedConnectionTimeout()\n  {\n    if (unusedConnectionTimeout != null && readTimeout != null\n        && unusedConnectionTimeout.toStandardDuration().compareTo(readTimeout.toStandardDuration()) >= 0) {\n      LOG.warn(\n          \"Ohh no! UnusedConnectionTimeout[%s] is longer than readTimeout[%s], please correct\"\n          + \" the configuration, this might not be supported in future.\",\n          unusedConnectionTimeout,\n          readTimeout\n      );\n    }\n    return unusedConnectionTimeout == null ? null : unusedConnectionTimeout.toStandardDuration();\n  }\n\n  public long getMaxQueuedBytes()\n  {\n    return maxQueuedBytes.getBytes();\n  }\n\n  public boolean isEagerInitialization(boolean defaultValue)\n  {\n    if (null == eagerInitialization) {\n      return defaultValue;","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/guice/http/DruidHttpClientConfig.java#L95-L131","documentation":"Log warning in DruidHttpClientConfig.getUnusedConnectionTimeout. If unusedConnectionTimeout is greater than or equal to readTimeout, the pool's idle-connection eviction is ineffective because a connection would be closed by the read timeout before it can be evicted for idleness; the config warns that this combination may be unsupported in future versions.","triggerScenarios":"getUnusedConnectionTimeout() is called (during HttpClient builder construction) with both druid.http.unusedConnectionTimeout and druid.http.readTimeout set and unusedConnectionTimeout >= readTimeout, e.g. unusedConnectionTimeout=PT10M with readTimeout=PT5M.","commonSituations":"Operators setting a long unusedConnectionTimeout to keep pooled connections alive while a readTimeout was added for query latency; copied http client tuning between node types; typo swapping the two duration values.","solutions":["Set druid.http.unusedConnectionTimeout strictly less than druid.http.readTimeout (e.g. unusedConnectionTimeout=PT4M with readTimeout=PT5M).","Or unset unusedConnectionTimeout (null) so only readTimeout applies.","Double-check the durations are not accidentally swapped in runtime.properties.","Plan for the future version where this combination may be rejected outright."],"exampleFix":"// before\ndruid.http.readTimeout=PT5M\ndruid.http.unusedConnectionTimeout=PT10M\n// after\ndruid.http.readTimeout=PT5M\ndruid.http.unusedConnectionTimeout=PT4M","handlingStrategy":"validation","validationCode":"// Validate http timeout ordering before building the client\nDuration unused = config.getUnusedConnectionTimeoutConfig();\nDuration read = config.getReadTimeoutConfig();\nif (unused != null && read != null && unused.compareTo(read) >= 0) {\n  throw new ConfigException(\"unusedConnectionTimeout must be < readTimeout\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep unusedConnectionTimeout strictly below readTimeout","Validate duration ordering in config linters","Unset unusedConnectionTimeout if readTimeout alone suffices","Check for swapped values when copying configs between environments"],"tags":["configuration","http-client","timeout"],"backgroundTag":"conflicting-config-options","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}