Mawrooth · RB-MWAIWORKER

AI Extraction Worker — incident runbook

AI Extraction Worker is monitored by Worker queue monitor on extraction queue depth. It is owned by AI Platform and serves the business services listed below. Use this runbook when an alert fires on this component.

Warning at extraction queue depth ≥ 20 items, critical at ≥ 60 items. Critical means user-visible impact: page the escalation owner.

dashboard: sim://grafana/mw-ai-workerlogs: sim://logs/mw-ai-workerowner: AI Platformrunbook: RB-MWAIWORKER

Signals & thresholds

  • Primary metric: extraction queue depth (items)
  • Warning threshold: ≥ 20 items
  • Critical threshold: ≥ 60 items
  • Dashboard: sim://grafana/mw-ai-worker
  • Log source: sim://logs/mw-ai-worker
  • SLA: 99.5% monthly availability
  • SLO: 99.9% of requests under warning threshold
  • External dependencies: Lovable AI Gateway

1. Detection

  1. Worker queue monitor reports extraction queue depth growing past the warning threshold — consumers are not keeping up.
  2. Work items age beyond their expected processing time.

2. Triage

  1. Confirm whether workers are running, crash-looping or blocked on a dependency.
  2. Check sim://logs/mw-ai-worker for repeated poison-message failures at the head of the queue.
  3. Compare arrival rate against processing rate to see whether this is an inflow spike or a stalled consumer.

3. Mitigation

  1. Restart or scale out the consumers.
  2. Move poison messages to a dead-letter queue so the backlog can drain.
  3. Temporarily pause non-critical producers to let the queue recover.

4. Verification

  1. Confirm extraction queue depth has been below the warning threshold for at least 10 minutes.
  2. Confirm the affected business services are healthy on the dashboard.
  3. Confirm no alerts remain open for this component and its downstream consumers.
  4. Spot-check one real end-to-end operation through the affected flow.

5. Rollback / restore

  1. If a deploy caused the incident, roll back to the previous release and re-verify.
  2. If a configuration or threshold change caused it, restore the previous value and record why.
  3. Re-enable any job, feature flag or channel that was paused during mitigation, one at a time.

Escalation path

  • First responder: NOC on duty — acknowledge within 5 minutes.
  • Component owner: AI Platform.
  • Escalation owner (page on critical): AI Platform.
  • Escalate if the metric is still critical 15 minutes after mitigation, or if data integrity is in doubt.
  • Declare a major incident if two or more critical components are alerting at the same time.

Blast radius — business services affected (1)

AI Document Import

External dependencies

Lovable AI Gateway — Document extraction, translation and hint generation models

Simulated incidents that exercise this runbook

AI import failures — Document extraction jobs failing at the model gateway; imports queueing.

Reporting notes

  • Record start time, actions taken and recovery time in the incident record.
  • Attach the dashboard screenshot and the dominant error message to the postmortem.
  • Content drafted for the monitoring demo — confirm the exact commands with the owning team before production use.