xai-org/x-algorithm · error · ConfigFailure

invalid timeout value ${tm.timeoutMillis} in thrift method $

Error message

invalid timeout value ${tm.timeoutMillis} in thrift method ${tm.funcName} of ${config.endpoint}

What it means

ConfigFailure thrown when a per-method timeoutMillis on a thrift endpoint config is explicitly set to <= 0. Each method config (tm) is validated after endpoint-level checks.

Source

Thrown at botmaker/botmaker_thrift/src/main/scala/com/twitter/botmaker/runtime/config/ThriftEndpointConfigs.scala:70

    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)
  }

  protected def mux[Iface: ClassTag](
    endpoint: String,
    servicePath: String,
    clientId: String,
    sessionTimeout: Duration,
    requestTimeout: Duration,
    retries: Int
  ): Unit = {
    val ctag = implicitly[ClassTag[Iface]]

View on GitHub (pinned to 24c60942c5)

Solutions

  1. Set a positive timeout_millis on the method, or remove it to inherit the endpoint default
  2. Check indentation so the value applies to the intended method

Example fix

# before
methods:
  - func_name: getTweet
    timeout_millis: 0
# after
methods:
  - func_name: getTweet
    timeout_millis: 300
Defensive patterns

Strategy: validation

Validate before calling

config.methods.asScala.foreach(tm => require(!tm.isSetTimeoutMillis || tm.timeoutMillis > 0, tm.funcName))

Try / catch

catch { case e: ConfigFailure => include endpoint + funcName in deployment error output }

Prevention

When it happens

Trigger: Declaring a method in a thrift endpoint with timeout_millis: 0 or a negative value.

Common situations: Method-level override blocks copied with 0 defaults; YAML indentation putting the timeout under the wrong method.

Understand the failure class

Related errors


AI-assisted analysis of xai-org/x-algorithm@24c60942c5 (2026-08-28). Data as JSON: /api/errors/c1993bd330867b4c. Report an issue: GitHub.