Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Slack Engineering 13 min read Incident mediumAdept

The Query Strikes Again

A customer's bulk removal of users triggered Slack's "forget user" async job, which fanned out into a huge number of "leave channel" jobs. These hammered a single Vitess shard holding 6% of thread-subscription data. Replication lag and OOM-killed MySQL primaries caused a promote-replace loop, because new replicas could not catch up from backup under the write load and automation deprovisioned them as unhealthy. Mitigations were manually provisioning larger replicas, scoping the job's queries and UPDATEs to the single channel being left, skipping client notifications for deactivated users, and temporarily disabling Thread View. Long-term fixes include fixing the replacement edge case, adding query throttling and circuit breakers (with contributions upstream to Vitess), and restructuring the job to avoid per-channel fan-out.

Related posts

  • Slack’s Incident on 2-22-22

    Slack Engineering mediumAdept

    A Consul agent rolling restart caused Mcrib, Slack's memcached control plane, to replace and flush cache nodes, dropping hit rates during peak traffic. A cache-fronted Group DM membership query hit a Vitess keyspace sharded by user, so every miss became a scatter query across all shards. Database load grew superlinearly, queries timed out, caches couldn't refill, and client retries kept the system stuck in a metastable cascading failure. Recovery required throttling client boots, fetching only missing keys, reading from replicas and later moving the query to a channel-sharded table; Mcrib's very efficiency at replacing nodes increased cache churn and worsened the outage.

  • Incident Report: November 20th, 2025

    Railway easyNovice

    A dip in GitHub push webhooks followed by a 10x surge flooded Railway's asynchronous deployment task queue, delaying all new deployments for about two and a half hours on November 20th, 2025. Workers locked up under memory pressure, so the team added and restarted workers and shed load by disabling deployments tier by tier (Free/Trial/Hobby, then Pro), re-enabling them in reverse order as recovery came. Running services and networking were unaffected. Follow-ups include segmented queue alerts, monitoring for deployment spikes, and fixing the worker lockup under memory pressure.

  • Incident Report: June 11th, 2024

    Railway mediumAdept

    A buggy host-migration workflow that issued a redeploy per replica rather than per deployment coincided with normal deploys, hourly crons and failed European placements, quadrupling load on an IO-heavy machine status endpoint that the scheduler polls across all regions. Status timeouts triggered retries that spread unschedulability between regions, leaving about 20% of US and EU instances degraded and some needing full restarts, with up to 20 minutes of downtime per workload. Fixes include caching status responses (the V2 runtime uses an in-memory database instead of files), global rate limits on workers, region-scoped scheduler dialing, and reaper tuning to evict Hobby stateless workloads first.

  • Break Stuff on Purpose

    Slack Engineering mediumAdept

    Slack's internal Kibana cluster failed in January 2024 after running out of disk, a consequence of co-locating its Elasticsearch storage on the same hosts as the application. The rebuild exposed a nearly two-year-old unmonitored backup that failed to restore and an outdated runbook, so users' dashboards and visualizations were lost. The team added scheduled backups, checked S3 retention, rewrote runbooks, and then deliberately filled the disks on a development cluster to rehearse recovery. The drill succeeded but missed the one-hour recovery goal and surfaced missing firewall rules in infrastructure as code. A later Kubernetes migration finished with about 30 minutes of downtime, and the backup script became a CLI that restores from cloud storage with a single command.

  • Incident Report: November 25th, 2025

    Railway mediumAdept

    Slow GitHub API calls (about 4x normal p95 latency) during peak hours backed up Railway's Temporal-based task queue, causing workers to run out of memory and crash in a cascading thundering-herd pattern as surviving and newly started workers were overwhelmed by the backlog. Deployments for Free, Trial and Hobby tiers were paused and Pro deploys delayed for roughly two and a half hours, while running services stayed online. Recovery came from increasing worker CPU and memory and fixing worker parameters that made them request more tasks than they could handle. Follow-up measures include an auto-tuning algorithm for worker task intake, more task queue capacity, and removing external API dependencies from critical workflows.

The quest for software engineering knowledge.

Look:
Layout: