astrid-runtime/astrid · error
provider request exceeds limit
Error message
provider request exceeds limit
What it means
The provider reads its JSON request from stdin with take(MAX_REQUEST_BYTES + 1) so it can distinguish an exactly-at-limit request from an oversized one. If more than MAX_REQUEST_BYTES bytes arrive, the request is rejected rather than parsed.
Solutions
- Shrink the request payload — remove oversized fields or reference data by ID instead of embedding it.
- Compare the sender's payload size against MAX_REQUEST_BYTES before writing to the provider's stdin.
- Align MAX_REQUEST_BYTES between host and provider if the limit changed between versions.
- Fix producers that concatenate or repeat request fields.
Example fix
// before: sender writes unbounded request stdin.write_all(&serde_json::to_vec(&big_request)?)?; // after: enforce the limit on the sender side let bytes = serde_json::to_vec(&request)?; assert!(bytes.len() as u64 <= MAX_REQUEST_BYTES, "provider request too large"); stdin.write_all(&bytes)?;
Defensive patterns
Strategy: validation
Validate before calling
// Sender side, before writing to the provider's stdin:
let bytes = serde_json::to_vec(&request)?;
if bytes.len() as u64 > MAX_REQUEST_BYTES {
return Err(anyhow!("request {} bytes > limit {}", bytes.len(), MAX_REQUEST_BYTES));
} Try / catch
// Host side
match write_request(stdin, &request) {
Err(e) if e.to_string().contains("exceeds limit") => {
// slim the payload (move bulk data out-of-band) and resend
}
other => other?,
} Prevention
- Reference large data by ID instead of embedding it in the request
- Check payload size against MAX_REQUEST_BYTES before every write
- Keep MAX_REQUEST_BYTES in sync between host and provider versions
When it happens
Trigger: The host writes a StorageProviderRequestV1 payload to the provider's stdin whose length exceeds MAX_REQUEST_BYTES — e.g. a huge embedded view definition, excessive metadata, or a host bug serializing an unbounded field.
Common situations: A host or test harness sends a bloated request (large embedded file listings, verbose debug fields); a misconfigured producer disables truncation; version drift where MAX_REQUEST_BYTES was lowered on the provider side.
Understand the failure class
Background: payload too large / request exceeds maximum size: why libraries cap bytes and how to fix oversize payloads — this error's family across 50 libraries.
Related errors
- this executable is an Astrid WinFsp provider, not an…
- unsupported provider protocol
- build WinFsp callback filesystem
- environment value for
- filesystem payload exceeds limit
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/edb93b511b68b0f4.
Report an issue: GitHub.
Appendix: source
Thrown at crates/astrid-storage-provider-winfsp/src/main.rs:97
eprintln!("{PROVIDER_NAME}: {error:#}");
std::process::exit(2);
},
}
}
async fn run() -> Result<StorageProviderResponseV1> {
let arguments = std::env::args_os().skip(1).collect::<Vec<_>>();
if arguments.as_slice() != [std::ffi::OsStr::new("--astrid-provider-stdio-v1")] {
bail!("this executable is an Astrid WinFsp provider, not an interactive command");
}
let mut bytes = Vec::new();
std::io::stdin()
.lock()
.take(MAX_REQUEST_BYTES + 1)
.read_to_end(&mut bytes)
.context("read provider request")?;
if bytes.len() as u64 > MAX_REQUEST_BYTES {
bail!("provider request exceeds limit");
}
let request: StorageProviderRequestV1 =
serde_json::from_slice(&bytes).context("decode provider request")?;
if request.protocol_version != STORAGE_PROVIDER_PROTOCOL_V1 {
bail!("unsupported provider protocol {}", request.protocol_version);
}
let request_id = request.request_id;
let outcome = match execute(request).await {
Ok(success) => StorageProviderOutcomeV1::Success(success),
Err(error) => StorageProviderOutcomeV1::Failure(StorageProviderFailureV1 {
code: "provider-operation".to_owned(),
message: error.to_string().chars().take(4096).collect(),
}),
};
Ok(StorageProviderResponseV1 {
protocol_version: STORAGE_PROVIDER_PROTOCOL_V1,
request_id,
provider: StorageProviderIdentityV1 {View on GitHub (pinned to affd8760f4)