From 901bb7a6a822d7833e6df422e3e41ec3c64d2f78 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Sun, 23 Aug 2026 17:11:14 -0400 Subject: [PATCH] fix: extend Daytona snapshot activation timeout --- docs/public/integrations/daytona.mdx | 2 +- lib/components/fabro-sandbox/src/daytona/mod.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/public/integrations/daytona.mdx b/docs/public/integrations/daytona.mdx index 828debc0d..9f512039f 100644 --- a/docs/public/integrations/daytona.mdx +++ b/docs/public/integrations/daytona.mdx @@ -231,7 +231,7 @@ Custom Daytona snapshot names are computed from the Dockerfile, resource hints, ### "Timed out waiting for snapshot to become active" -Snapshot creation took longer than 10 minutes. This can happen with large Dockerfiles. Check the snapshot status in the Daytona dashboard — it may still be building. Subsequent runs will reuse the snapshot once it's active. +Snapshot creation took longer than 30 minutes. This can happen with large Dockerfiles. Check the snapshot status in the Daytona dashboard — it may still be building. Subsequent runs will reuse the snapshot once it's active. ### Git clone fails for private repositories diff --git a/lib/components/fabro-sandbox/src/daytona/mod.rs b/lib/components/fabro-sandbox/src/daytona/mod.rs index a58bdf6ec..14af37bd7 100644 --- a/lib/components/fabro-sandbox/src/daytona/mod.rs +++ b/lib/components/fabro-sandbox/src/daytona/mod.rs @@ -76,6 +76,8 @@ const DAYTONA_POST_CLONE_SETUP_TIMEOUT: Duration = Duration::from_mins(5); /// Best-effort push-credential setup should not consume or extend the required /// post-clone setup budget. const DAYTONA_CREDENTIAL_SETUP_TIMEOUT: Duration = Duration::from_secs(10); +/// Budget for a custom snapshot to reach Daytona's active state. +const DAYTONA_SNAPSHOT_ACTIVE_TIMEOUT: Duration = Duration::from_mins(30); /// Grace for the toolbox to return the server-side command timeout response. /// The SDK truncates the server timeout to whole seconds, so the server can /// fire up to one second before the shared deadline; this additional grace @@ -1121,7 +1123,7 @@ impl DaytonaSandbox { use daytona_api_client::models::SnapshotState; let mut delay = std::time::Duration::from_secs(2); let max_delay = std::time::Duration::from_secs(30); - let deadline = Instant::now() + std::time::Duration::from_mins(10); + let deadline = Instant::now() + DAYTONA_SNAPSHOT_ACTIVE_TIMEOUT; while Instant::now() < deadline { time::sleep(delay).await;