{"record":{"id":"ce94567ff13acc8a","repo":"remotion-dev/remotion","slug":"frame-evicted-from-cache","errorCode":null,"errorMessage":"Frame evicted from cache","messagePattern":"Frame evicted from cache","errorType":"error_code","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"packages/compositor/rust/ffmpeg.rs","lineNumber":102,"sourceCode":"        one_frame_in_time_base,\n        threshold,\n        tone_mapped,\n        frame_cache_manager,\n        thread_index,\n        max_cache_size,\n    )?;\n\n    let from_cache = frame_cache_manager.get_item_from_id(\n        &src,\n        &original_src,\n        transparent,\n        tone_mapped,\n        frame_id,\n    );\n\n    match from_cache {\n        Ok(Some(data)) => Ok(data),\n        Ok(None) => Err(std::io::Error::new(\n            ErrorKind::Other,\n            \"Frame evicted from cache\",\n        ))?,\n        Err(err) => Err(err),\n    }\n}\n","sourceCodeStart":84,"sourceCodeEnd":109,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/compositor/rust/ffmpeg.rs#L84-L109","documentation":"Returned by the frame-fetch path in packages/compositor/rust/ffmpeg.rs when frame_cache_manager.get_item_from_id() returns Ok(None) - the frame's id was known (computed via get_frame_id) but the cached bytes have since been evicted under the configured max_cache_size. This is an internal LRU-eviction condition inside the native binary, surfaced as an io::Error of kind Other; the compositor normally retries by re-decoding the frame.","triggerScenarios":"A cache sized too small for the working set (max_cache_size smaller than the number of distinct frames in flight), high concurrency causing churn, or heavy memory pressure forcing aggressive eviction between the id lookup and the data retrieval.","commonSituations":"Rendering many videos concurrently on a machine with limited RAM; a long video whose random-access pattern exceeds the frame cache; a configured cache size that is too low for the resolution/length of the composition.","solutions":["Raise the frame cache size / available memory so the working set fits and eviction stops.","Reduce render concurrency so fewer frames compete for the cache.","Retry the render - transient eviction-driven failures are normally recovered by the compositor's internal retry, so a persistent failure points to sustained memory pressure."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"async function renderWithRetry(opts, attempts = 3) {\n  for (let i = 0; i < attempts; i++) {\n    try {\n      return await renderMedia(opts);\n    } catch (err) {\n      if (i === attempts - 1 || !/Frame evicted from cache/.test(String(err))) throw err;\n    }\n  }\n}","preventionTips":["Increase the frame cache size / available RAM so the working set fits.","Lower render concurrency to reduce cache churn.","Treat persistent eviction failures as a sign of sustained memory pressure, not transient flakiness."],"tags":["compositor","rust","cache","memory","rendering"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}