vectordotdev/vector · info
static
Error message
static
What it means
This panic fires in `default_request_builder_concurrency_limit` when `worker_threads()` returns `None` (no configured/applicable worker count) and the fallback `NonZeroUsize::new(8)` unexpectedly fails. Constructing a NonZeroUsize from the literal 8 can never fail, so the expect marks a compile-time-known constant as valid.
Solutions
- No action needed; this is an unreachable defensive assertion.
- Set an explicit `request.concurrency` in sink config to avoid relying on the default path entirely.
Defensive patterns
Strategy: validation
Validate before calling
// Bypass the default path by setting concurrency explicitly in the sink config: // request: // concurrency: 8
Prevention
- Set `request.concurrency` explicitly to avoid relying on worker-thread defaults.
- Configure `worker_threads` in the Vector app config when tuning concurrency.
When it happens
Trigger: Calling this default when the app-level worker thread count is unavailable AND the literal fallback were invalid — the latter is impossible, so the panic is unreachable.
Common situations: Not reachable; exists purely to satisfy the type system with a documented fallback default of 8 concurrent request builders.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Failed to get entry for dir
- join error or bad poll
- Maximum requests in-flight; poll_ready must be called first
- mutex poisoned
- producer unexpectedly dropped
AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16).
Data as JSON: /api/errors/82b891abcdf85d71.
Report an issue: GitHub.
Appendix: source
Thrown at src/sinks/util/request_builder.rs:17
use std::{io, num::NonZeroUsize};
use bytes::Bytes;
use vector_lib::request_metadata::{GroupedCountByteSize, RequestMetadata};
use super::{Compression, Compressor, encoding::Encoder, metadata::RequestMetadataBuilder};
pub fn default_request_builder_concurrency_limit() -> NonZeroUsize {
if let Some(limit) = std::env::var("VECTOR_EXPERIMENTAL_REQUEST_BUILDER_CONCURRENCY")
.map(|value| value.parse::<NonZeroUsize>().ok())
.ok()
.flatten()
{
return limit;
}
crate::app::worker_threads().unwrap_or_else(|| NonZeroUsize::new(8).expect("static"))
}
pub struct EncodeResult<P> {
pub payload: P,
pub uncompressed_byte_size: usize,
pub transformed_json_size: GroupedCountByteSize,
pub compressed_byte_size: Option<usize>,
}
impl<P> EncodeResult<P>
where
P: AsRef<[u8]>,
{
pub fn uncompressed(payload: P, transformed_json_size: GroupedCountByteSize) -> Self {
let uncompressed_byte_size = payload.as_ref().len();
Self {
payload,
uncompressed_byte_size,View on GitHub (pinned to bdb87aeaa4)