{"record":{"id":"7d062b9143d5a37d","repo":"BloopAI/vibe-kanban","slug":"copy-project-files-timed-out-after-30s","errorCode":null,"errorMessage":"Copy project files timed out after 30s","messagePattern":"Copy project files timed out after 30s","errorType":"exception","errorClass":"ContainerError","httpStatus":null,"severity":"error","filePath":"crates/local-deployment/src/container.rs","lineNumber":1599,"sourceCode":"    /// Skips files that already exist at target with same size.\n    async fn copy_project_files(\n        &self,\n        source_dir: &Path,\n        target_dir: &Path,\n        copy_files: &str,\n    ) -> Result<(), ContainerError> {\n        let source_dir = source_dir.to_path_buf();\n        let target_dir = target_dir.to_path_buf();\n        let copy_files = copy_files.to_string();\n\n        tokio::time::timeout(\n            std::time::Duration::from_secs(30),\n            tokio::task::spawn_blocking(move || {\n                copy::copy_project_files_impl(&source_dir, &target_dir, &copy_files)\n            }),\n        )\n        .await\n        .map_err(|_| ContainerError::Other(anyhow!(\"Copy project files timed out after 30s\")))?\n        .map_err(|e| ContainerError::Other(anyhow!(\"Copy files task failed: {e}\")))?\n    }\n\n    async fn kill_all_running_processes(&self) -> Result<(), ContainerError> {\n        tracing::info!(\"Killing all running processes\");\n        let running_processes = ExecutionProcess::find_running(&self.db.pool).await?;\n\n        tracing::info!(\n            \"Found {} running processes to kill\",\n            running_processes.len()\n        );\n\n        for process in running_processes {\n            tracing::info!(\n                \"Killing process: id={}, run_reason={:?}\",\n                process.id,\n                process.run_reason\n            );","sourceCodeStart":1581,"sourceCodeEnd":1617,"githubUrl":"https://github.com/BloopAI/vibe-kanban/blob/4deb7eca8f381f7cbc1f9d15515a9ab8f8009053/crates/local-deployment/src/container.rs#L1581-L1617","documentation":"copy_project_files wraps copy_project_files_impl in tokio::task::spawn_blocking with a 30s timeout. If the blocking copy does not finish within 30 seconds, the future is dropped and this error is returned. It indicates the project copy (files/images) is too slow or stalled, not that the copy failed logically.","triggerScenarios":"Calling copy_files_and_images on a very large project directory, a directory on a slow/network filesystem, or when disk I/O is heavily saturated so copy_project_files_impl exceeds 30s.","commonSituations":"Copying huge repos with node_modules/target dirs included in copy_files; copying over NFS/network mounts; heavily loaded dev machines; antimalware/Spotlight indexing slowing I/O on macOS/Windows.","solutions":["Reduce the amount of data copied: exclude build artifacts (node_modules, target, .git) from copy_files.","Copy to a local SSD target instead of a network mount.","Retry the operation once the system load decreases; a stalled copy may succeed on retry.","Increase the timeout constant (Duration::from_secs(30)) if your projects legitimately need longer."],"exampleFix":"// before\nstd::time::Duration::from_secs(30),\n// after\nstd::time::Duration::from_secs(120), // large projects need more headroom","handlingStrategy":"retry","validationCode":"// estimate copy size first\nlet total: u64 = walkdir::WalkDir::new(&source_dir)\n    .into_iter().filter_map(|e| e.ok())\n    .filter_map(|e| e.metadata().ok())\n    .map(|m| m.len()).sum();\nif total > 500_000_000 {\n    tracing::warn!(total, \"large copy may exceed the 30s timeout\");\n}","typeGuard":null,"tryCatchPattern":"match copy_project_files(...).await {\n    Err(ContainerError::Other(e)) if e.to_string().contains(\"timed out\") => {\n        tokio::time::sleep(Duration::from_secs(5)).await;\n        retry_with_longer_timeout(...).await?;\n    }\n    other => other?,\n}","preventionTips":["Exclude node_modules/target/.git from copy_files.","Keep source and target on local SSDs, not network mounts.","Scale the timeout with project size.","Alert on repeated copy timeouts."],"tags":["timeout","filesystem","io","async"],"backgroundTag":"operation-timeout","analyzedSha":"4deb7eca8f381f7cbc1f9d15515a9ab8f8009053","analyzedAt":"2026-08-29T09:24:13.446Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}