From 0aeda842b4ef2126a7a43c3b838cc6b1ca2e7cc8 Mon Sep 17 00:00:00 2001 From: Jeremy Walker Date: Wed, 28 Oct 2026 21:04:05 +0900 Subject: [PATCH] Give the boot translations sync more time The boot sync's git pull can take more than 180 seconds on EFS, and the timeout then kills it part way through. That leaves files behind which block later pulls. Raise the timeout to 360 seconds, which still fits inside the ECS health check grace period of 600 seconds. Co-Authored-By: Claude Opus 5.5 --- bin/start_webserver | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/start_webserver b/bin/start_webserver index 23098c914c..d9f30caeb6 100755 --- a/bin/start_webserver +++ b/bin/start_webserver @@ -28,9 +28,12 @@ FileUtils.chdir APP_ROOT do # as safe here as well as in the glob above. # Slightly stale translations are far better than a webserver that will not boot, # so the command reports failures to Sentry and returns rather than raising. The - # outer timeout covers a git process that hangs instead of failing. + # outer timeout covers a git process that hangs instead of failing. A pull that + # changes many files can take several minutes on EFS, and killing one part way + # through leaves files behind that block later pulls, so the timeout is generous. + # It still sits well inside the ECS health check grace period of 600 seconds. system! "git config --global --add safe.directory /mnt/efs/repos/i18n" - system("timeout -k 10 180 bundle exec bin/rails runner 'TranslationRepo::SyncOnBoot.()'") || + system("timeout -k 10 360 bundle exec bin/rails runner 'TranslationRepo::SyncOnBoot.()'") || warn("\n== Translations were not synced on boot ==") # Warm the local cache of EFS to avoid big read spikes as users start to hit the website.