Personalization Queue Lag Runbook
Use this runbook when refresh jobs are not completing in time or queue pressure is rising.
When To Use
- Pending personalization requests stay unresolved.
- Queue depth grows faster than workers can drain.
- Worker failures or enqueue failures spike.
Signals
RecSysPersonalizationQueueLagHighRecSysPendingRefreshAgeHighRecSysWorkerFailureRateHighRecSysQueueEnqueueFailuresHighRecSysRefreshTerminalFailureRateHigh
Immediate Actions (First 10 Minutes)
- Confirm queue and worker health:
- Queue depth metric:
hh_lion_personalization_queue_depth - Worker outcomes:
hh_lion_personalization_worker_events_total
- Queue depth metric:
- Check Redis connectivity and saturation.
- Pause canary traffic expansion while lag is unresolved.
Triage Steps
- Validate worker process state:
uv run rq info --url redis://localhost:16379/0
- Check worker logs for repeated terminal failures (artifact load, cache write, runtime errors).
- Confirm serving startup and health endpoints:
curl -s http://<serving-host>/health/ready | jq
- Inspect refresh outcomes:
timeout_terminalizedcache_errorcorrupted
Recovery Actions
- Scale worker replicas/concurrency.
- Restart unhealthy workers.
- If failures are model-related, switch to last known good model (see model rollback runbook).
- If Redis is degraded, fail refresh requests cleanly and avoid unbounded pending growth.
Validation Checklist
- Queue depth trend is flat or decreasing.
- Pending age drops below threshold.
- Worker failure ratio returns to baseline.
- Refresh timeout terminalizations drop below alert threshold.