-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Overview
There's a potential race condition when restarting the PennieBot service during deployment.
Current State
- Deploy workflow restarts service with
Restart-Service PennieBot - Health check runs immediately after
- No wait time for service to fully initialize
Symptoms
- Intermittent health check failures after deployment
- "Service unavailable" errors immediately after restart
Recommended Solution
- Add retry logic to health checks
- Wait for service status to become "Running"
- Add exponential backoff for health endpoint checks
Example
# Wait for service to start
$maxRetries = 30
$retryCount = 0
do {
Start-Sleep -Seconds 2
$status = (Get-Service PennieBot).Status
$retryCount++
} while ($status -ne 'Running' -and $retryCount -lt $maxRetries)
# Then check health endpointAcceptance Criteria
- Health checks wait for service initialization
- Deployment doesn't fail due to timing issues
- Reasonable timeout (e.g., 60 seconds max)
🤖 Generated with Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request