xai-org/x-algorithm · error · ConfigFailure
invalid session timeout value ${config.sessionTimeoutMillis}
Error message
invalid session timeout value ${config.sessionTimeoutMillis} in thrift endpoint ${config.endpoint} What it means
ConfigFailure thrown when a ThriftEndpointConfig explicitly sets sessionTimeoutMillis to a value <= 0. The check only applies when the field is set (isSetSessionTimeoutMillis), so it catches negative/zero overrides rather than unset defaults.
Source
Thrown at botmaker/botmaker_thrift/src/main/scala/com/twitter/botmaker/runtime/config/ThriftEndpointConfigs.scala:55
}
}
trait ThriftEndpointConfigs extends ServiceConfigs {
private final val thriftEndpoints = ArrayBuffer[ThriftEndpointConfig]()
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}"
)
}View on GitHub (pinned to 24c60942c5)
Solutions
- Set sessionTimeoutMillis to a positive millisecond value, or remove the field entirely to use the default
- Grep config files for session_timeout_millis: 0 / negative values
Example fix
# before session_timeout_millis: 0 # after session_timeout_millis: 10000 # or omit the field
Defensive patterns
Strategy: validation
Validate before calling
require(!config.isSetSessionTimeoutMillis || config.sessionTimeoutMillis > 0)
Try / catch
catch { case e: ConfigFailure => point operators at the endpoint's session_timeout_millis value } Prevention
- Never use 0 as 'use default' — omit the field
- Schema-validate numeric config ranges (positive ints) in CI
When it happens
Trigger: Adding a thrift endpoint with session_timeout_millis: 0 or a negative number in config or in the addThriftEndpoint call.
Common situations: Copy-pasted config with a 0 placeholder meant to mean 'default'; arithmetic computing the timeout that underflows to 0/negative.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- invalid request timeout value ${config.requestTimeoutMillis}
- 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/4eae02dfd940adbb.
Report an issue: GitHub.