Increase warmup timeouts for cold JVM startup (#5259)

The warmup tool was timing out during CreateGame because the per-step
timeout was only 30 seconds. On a cold JVM (freshly started Eagle
instance during blue-green deployment), CreateGame can take longer
than 30 seconds due to:
- JIT compilation not yet warmed up
- First-time class loading
- Game initialization including Shardok communication

Changes:
- Increase per-operation timeout from 30s to 90s
- Increase overall warmup timeout from 60s to 300s (5 minutes)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-12 19:51:03 -08:00
committed by GitHub
co-authored by Claude Opus 4.5
parent 37fe57be71
commit 0e3f1bcb87
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -65,7 +65,8 @@ fi
# If we found the Go tool, use it # If we found the Go tool, use it
if [ -n "${WARMUP_TOOL}" ]; then if [ -n "${WARMUP_TOOL}" ]; then
log_info "Using Go warmup tool: ${WARMUP_TOOL}" log_info "Using Go warmup tool: ${WARMUP_TOOL}"
if "${WARMUP_TOOL}" --address="${HOST}" --timeout=60s; then # Use 5 minute timeout to allow for slow operations on cold JVM
if "${WARMUP_TOOL}" --address="${HOST}" --timeout=300s; then
log_info "Warmup complete!" log_info "Warmup complete!"
exit 0 exit 0
else else
+2 -1
View File
@@ -396,8 +396,9 @@ done:
} }
// waitForResponse waits for a response matching the predicate // waitForResponse waits for a response matching the predicate
// Use 90s timeout because CreateGame can be slow on cold JVM (JIT not warmed up)
func waitForResponse(stream eagle.Eagle_StreamUpdatesClient, matches func(*eagle.UpdateStreamResponse) bool) (*eagle.UpdateStreamResponse, error) { func waitForResponse(stream eagle.Eagle_StreamUpdatesClient, matches func(*eagle.UpdateStreamResponse) bool) (*eagle.UpdateStreamResponse, error) {
return waitForResponseWithTimeout(stream, matches, 30*time.Second) return waitForResponseWithTimeout(stream, matches, 90*time.Second)
} }
func waitForResponseWithTimeout(stream eagle.Eagle_StreamUpdatesClient, matches func(*eagle.UpdateStreamResponse) bool, timeout time.Duration) (*eagle.UpdateStreamResponse, error) { func waitForResponseWithTimeout(stream eagle.Eagle_StreamUpdatesClient, matches func(*eagle.UpdateStreamResponse) bool, timeout time.Duration) (*eagle.UpdateStreamResponse, error) {