mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 20:55:44 +00:00
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:
@@ -65,7 +65,8 @@ fi
|
||||
# If we found the Go tool, use it
|
||||
if [ -n "${WARMUP_TOOL}" ]; then
|
||||
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!"
|
||||
exit 0
|
||||
else
|
||||
|
||||
@@ -396,8 +396,9 @@ done:
|
||||
}
|
||||
|
||||
// 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) {
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user