{"record":{"id":"311c941aca908cce","repo":"pola-rs/polars","slug":"invalid-value-for-polars-record-batch-prefetch-kby","errorCode":null,"errorMessage":"invalid value for POLARS_RECORD_BATCH_PREFETCH_KBYTES_BUDGET: {x}","messagePattern":"invalid value for POLARS_RECORD_BATCH_PREFETCH_KBYTES_BUDGET: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-stream/src/nodes/io_sources/ipc/builder.rs","lineNumber":75,"sourceCode":"                        panic!(\"invalid value for POLARS_RECORD_BATCH_PREFETCH_SIZE: {x}\")\n                    })\n                    .get()\n            })\n            .unwrap_or(\n                // Similar to Parquet.\n                execution_state\n                    .num_pipelines\n                    .saturating_mul(2)\n                    .max(get_request_budget() as usize)\n                    .clamp(16, 2048),\n            )\n            .max(1);\n\n        let prefetch_kbytes_limit = std::env::var(\"POLARS_RECORD_BATCH_PREFETCH_KBYTES_BUDGET\")\n            .map(|x| {\n                x.parse::<NonZeroUsize>()\n                    .unwrap_or_else(|_| {\n                        panic!(\"invalid value for POLARS_RECORD_BATCH_PREFETCH_KBYTES_BUDGET: {x}\")\n                    })\n                    .get()\n            })\n            .unwrap_or({\n                // Similar to Parquet.\n                let target_chunk_size_kb = FetchConfig::random_access().chunk_size.div_ceil(1024);\n                4 * execution_state.num_pipelines * target_chunk_size_kb\n            })\n            // Avoid deadlock.\n            .max(polars_io::cloud::concurrency_config::get_download_chunk_size().div_ceil(1024));\n\n        if config::verbose() {\n            eprintln!(\n                \"[IpcReaderBuilder]: prefetch_limit: {}, prefetch_kbytes_limit: {}\",\n                prefetch_limit, prefetch_kbytes_limit\n            );\n        }\n","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/pola-rs/polars/blob/9b5d73fd00236295624374b075d16b1fe6ec6df9/crates/polars-stream/src/nodes/io_sources/ipc/builder.rs#L57-L93","documentation":"Panic in IpcReaderBuilder::set_execution_state: POLARS_RECORD_BATCH_PREFETCH_KBYTES_BUDGET was set but is not a valid NonZeroUsize. It overrides the kilobyte memory budget for the IPC prefetch pipeline; the invalid string {x} causes reader setup to abort.","triggerScenarios":"Invalid value in POLARS_RECORD_BATCH_PREFETCH_KBYTES_BUDGET.","commonSituations":"See trigger scenarios.","solutions":["Set POLARS_RECORD_BATCH_PREFETCH_KBYTES_BUDGET to a positive integer or unset it."],"exampleFix":"export POLARS_RECORD_BATCH_PREFETCH_KBYTES_BUDGET=65536","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b5d73fd00236295624374b075d16b1fe6ec6df9","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":"2026-08-19T12:15:06.350Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}