influxdata/influxdb · error · GrpcTimeoutParseError

The provided value contained too many digits in the prefix…

Error message

The provided value contained too many digits in the prefix; expected a maximum of 8 but got {0}

What it means

GrpcTimeoutParseError::TooManyDigits, a validation guard enforcing the gRPC over-HTTP2 spec that the numeric prefix of the `grpc-timeout` header be at most 8 digits before the unit suffix; it fires when a longer digit string is received.

Solutions

  1. Shorten the numeric prefix, converting to a larger unit (e.g. 100000000n -> 100M or 1H)
  2. Cap client-side timeout values to at most 99,999,999 in the chosen unit
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at core/data_types/src/lib.rs:2422 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/ab5391fd88c5f5c3. Report an issue: GitHub.

Appendix: source

Thrown at core/data_types/src/lib.rs:2422

            },
        )
    }
}

/// A duration pulled from the `grpc-timeout` header, newtype'd so we don't confuse durations at
/// some points and so that we can impl FromStr
#[derive(Debug, Copy, Clone)]
pub struct GrpcTimeoutDuration(pub Duration);

/// An error that can arise from trying to parse the `grpc-timeout` duration
#[derive(thiserror::Error, Debug)]
pub enum GrpcTimeoutParseError {
    /// The header was empty
    #[error("The provided value was empty")]
    EmptyValue,
    /// There were too many digits in the header before the suffix - the grpc spec specifies that
    /// there must be no more than 8.
    #[error(
        "The provided value contained too many digits in the prefix; expected a maximum of 8 but got {0}"
    )]
    TooManyDigits(usize),
    /// The value (number before the suffix) couldn't be parsed to a u64
    #[error(
        "Failed to parse the value; provided {value:?} and encountered the following error: {err}"
    )]
    UnparseableValue {
        /// The value which we couldn't parse
        value: String,
        /// The error arising from the failure to parse
        err: <u64 as FromStr>::Err,
    },
    /// The suffix which specifies the time base (e.g. seconds, hours, milliseconds, etc)
    #[error("The value contained an unrecognized suffic of {0:?}")]
    UnrecognizedSuffix(String),
}

View on GitHub (pinned to 06200ef96b)