xai-org/x-algorithm · error · ConfigFailure
invalid request timeout value ${config.requestTimeoutMillis}
Error message
invalid request timeout value ${config.requestTimeoutMillis} in thrift endpoint ${config.endpoint} What it means
ConfigFailure thrown when a ThriftEndpointConfig explicitly sets requestTimeoutMillis <= 0. Same guard pattern as the session timeout: only fires when the field is present in the config.
Source
Thrown at botmaker/botmaker_thrift/src/main/scala/com/twitter/botmaker/runtime/config/ThriftEndpointConfigs.scala:61
final def getThriftEndpoints: Seq[ThriftEndpointConfig] = thriftEndpoints.toSeq
final def getThriftEndpoint(endpoint: String): Option[ThriftEndpointConfig] =
thriftEndpoints.filter(_.endpoint == endpoint).headOption
final def addThriftEndpoint(config: ThriftEndpointConfig): Unit = {
unique(Endpoint, config.endpoint)
validateEndpoint(config.endpoint)
if (config.isSetSessionTimeoutMillis && config.sessionTimeoutMillis <= 0) {
throw ConfigFailure(
s"invalid session timeout value ${config.sessionTimeoutMillis} in thrift endpoint ${config.endpoint}"
)
}
if (config.isSetRequestTimeoutMillis && config.requestTimeoutMillis <= 0) {
throw ConfigFailure(
s"invalid request timeout value ${config.requestTimeoutMillis} in thrift endpoint ${config.endpoint}"
)
}
config.methods.asScala foreach { tm =>
unique(FuncName, config.endpoint, tm.funcName)
validateFuncName(tm.funcName)
if (tm.isSetTimeoutMillis && tm.timeoutMillis <= 0) {
throw ConfigFailure(
s"invalid timeout value ${tm.timeoutMillis} in thrift method ${tm.funcName} of ${config.endpoint}"
)
}
}
thriftEndpoints.append(config)
}
View on GitHub (pinned to 24c60942c5)
Solutions
- Use a positive request_timeout_millis value or omit it
- If intent was 'no override', delete the key from config
Example fix
# before request_timeout_millis: 0 # after request_timeout_millis: 5000 # or omit
Defensive patterns
Strategy: validation
Validate before calling
require(!config.isSetRequestTimeoutMillis || config.requestTimeoutMillis > 0)
Try / catch
catch { case e: ConfigFailure => fail config load with endpoint name and value } Prevention
- Treat timeouts as optional-or-positive in your config schema
- Grep configs for _timeout_millis: 0 during review
When it happens
Trigger: Adding a thrift endpoint with request_timeout_millis set to 0 or negative.
Common situations: Placeholder zero in templated configs; disabling timeouts by setting 0 (not supported — omit the field instead).
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- invalid session timeout value ${config.sessionTimeoutMillis}
- invalid timeout value ${tm.timeoutMillis} in thrift method $
- The value class ${config.valueThriftClass}, is not supported
- Regex timeoutMilis must be greater than 0
- Request with model version ($modelVersion) and embedding typ
AI-assisted analysis of xai-org/x-algorithm@24c60942c5 (2026-08-28).
Data as JSON: /api/errors/3ba1b1e09bec1b11.
Report an issue: GitHub.