---
title: "May 18 Replit downtime"
description: "A latent Go bug leaked RWMutex read-locks whenever a configuration kind had no handler."
url: "https://swe.quest/articles/may-18-replit-downtime-8ded63600c4e370b"
canonical: "https://replit.com/blog/may-18-replit-downtime"
source: "Replit"
published: "2023-05-20"
difficulty: "medium"
kind: "Incident"
reading_minutes: 4
tags: ["incident-response","go","concurrency","deployment","configuration"]
---

# May 18 Replit downtime

A post on [Replit](https://swe.quest/sources/replit.md), published 2023-05-20, 4 min read, Incident. Original: [https://replit.com/blog/may-18-replit-downtime](https://replit.com/blog/may-18-replit-downtime)

## Summary

A latent Go bug leaked RWMutex read-locks whenever a configuration kind had no handler. The first write-lock attempt, during a configuration push to all clusters at once, deadlocked every Repl VM and caused about two hours of total downtime. Recovery was slowed by liveness probes that failed open, a rollback that took two tries and reset the added capacity, and an autoscaler that ignored request volume and shrank instance groups. Fixes include fast, reliable rollbacks, staggered config rollouts with jitter, self-healing health and liveness logic, and more static analysis.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Incidents & postmortems](https://swe.quest/tags/incident-response.md) (Reliability & operations)
- [Go](https://swe.quest/tags/go.md) (Languages)
- [Concurrency](https://swe.quest/tags/concurrency.md) (Compilers & runtimes)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [Configuration management](https://swe.quest/tags/configuration.md) (Reliability & operations)

## Prerequisites

- Go sync.RWMutex ([easy posts on Go](https://swe.quest/tags/go.md?difficulty=easy))
- autoscaling instance groups ([easy posts on Capacity planning](https://swe.quest/tags/capacity-planning.md?difficulty=easy))
- health checks and liveness probes

## Keywords

Replit, RWMutex, Managed Instance Groups

## Related posts

- [Data Loss: a sad tale with a happy ending](https://swe.quest/articles/data-loss-a-sad-tale-with-a-happy-ending-94994cb503d66c03.md): Replit · 2021-09-10 · Medium · 4 min read · Incidents & postmortems, Storage systems, Go, Debugging, Linux
  Replit silently lost or corrupted user repl data for months.
- [Break Stuff on Purpose](https://swe.quest/articles/break-stuff-on-purpose-87dc2221ffb9f4a6.md): Slack Engineering · 2024-12-10 · Medium · 5 min read · Chaos engineering, Incidents & postmortems, Observability, SRE
  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.
- [May 30 incident update](https://swe.quest/articles/may-30-incident-update-3783b8eb72e49183.md): Deno · 2022-06-02 · Easy · 2 min read · Incidents & postmortems, Consensus, Capacity planning, Linux
  A 70-minute Deno Deploy outage on May 30, 2022 was caused by the etcd service discovery cluster running out of memory after a network-wide load test: scale-up and scale-down generated a burst of updates, etcd daemons exceeded VM RAM, the Linux OOM killer terminated several at once, and quorum was lost.
- [Slack’s Incident on 2-22-22](https://swe.quest/articles/slack-s-incident-on-2-22-22-7a35cde32cfb5fd8.md): Slack Engineering · 2022-04-26 · Medium · 12 min read · Incidents & postmortems, Caching, Resilience, MySQL, Distributed systems
  A Consul agent rolling restart caused Mcrib, Slack's memcached control plane, to replace and flush cache nodes, dropping hit rates during peak traffic.
- [Root Cause Analysis for Render's Extended Service Disruption on 3/26/24](https://swe.quest/articles/root-cause-analysis-for-render-s-extended-service-disruption-on-3-26-24-236e0e0282db843d.md): Render · 2024-03-29 · Medium · 5 min read · Incidents & postmortems, Resilience, Storage systems, Deployment, Identity & auth
  A faulty control-plane code change on March 26, 2024 restarted every customer and system workload on Render; a feature-flag bug had kept it from running in staging, and test infrastructure differed between environments.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
