Sunday, 4:07 PM. The CTO’s first sentence on the phone was: “Our staging is gone, our prod database is thrashing, our WAF is blocking sign-ups, and our DevOps lead is at a wedding in Portugal. Launch is Tuesday morning. Are you available.” It was not a question. It was a man reading a list.
I told him to put a kettle on and stay near a laptop. The call was 23 seconds long. We were under signed NDA and into a shared screen within twelve minutes.
At a glance
- Consumer SaaS in the habit-tracking adjacency, Canadian-founded, ~25 employees, ~50k visits/month in the pre-launch baseline.
- Two days before a coordinated launch (a national TV segment, a paid social campaign queued, an app-store feature negotiated for the Tuesday window), three independent failures cascaded over a Saturday-into-Sunday window.
- Stack Harbor was not a current vendor. Emergency stabilization engagement, scoped on the call, started 4:19 PM Sunday.
- First mitigation in customer-visible traffic at 4:54 PM. Sev-1 closed at 6:21 PM. Site held through launch week, including the press-hit hour. Customer-reported incidents during launch week: four, none Sev-1.
- The engagement converted to an ongoing Monitoring/Support retainer in week three. That part was not the goal on Sunday.
The chain of failures
Three things had gone wrong. None of them was the whole story. This is how real incidents present.
One: a runaway query introduced by a Friday-afternoon merge. A developer had merged a branch into main on Friday around 5 PM that added a “weekly insights” feature to the app. The query that powered it joined four tables — user events, user goals, user streaks, and a derived weekly-aggregation table that didn’t have the index the join assumed. In staging the feature worked because the staging dataset was small. In production, by Saturday afternoon, the query was running against 18 months of user-event data and holding row-level locks on the events table for 40-plus seconds per invocation. Every time a user opened their dashboard, another instance of the query queued behind the previous one. RDS FreeableMemory had been bleeding since Saturday at 3 PM. By Sunday morning the database was paging hard and the application servers were timing out on connections.
Two: a Core Rule Set update on the WAF. Their ModSecurity (in front of the application via a managed WAF on the cloud edge) had auto-updated to a new OWASP CRS minor version overnight Friday into Saturday. The new rule set was stricter about JSON payloads that contained nested arrays of objects with certain numeric ranges. The team’s onboarding form — the one a user fills in the first time they open the app — sent exactly that shape. ModSecurity rule 932240 was 500-ing about 30% of new sign-up attempts. Existing users could log in fine, which is why nobody noticed on Saturday morning standup. The marketing team had been doing a soft pre-launch push and the conversion rate had quietly dropped to half overnight. They thought it was a Saturday weekend effect.
Three: the staging environment. Their staging environment was provisioned from a Pulumi config that synced from a config repo every six hours. Sometime Saturday around noon, that sync had failed mid-run after a transient registry error fetching one container image — and the failure had left the staging cluster with a half-applied configuration. Three pods would not come up; two services were pointing at a database endpoint that didn’t exist anymore. Staging was effectively down, which mattered because it was the only place the team could safely test fixes before launch. Their DevOps lead — the only person who had ever debugged the Pulumi setup — was in a Portuguese countryside wedding venue at the time, sleeping off the previous evening.
The three failures didn’t cause each other. They converged. That is what every real incident looks like in retrospect — a sequence of things that would each have been manageable in isolation, arriving together.
The first 90 minutes
Triage first. We were on a shared screen by 4:19 PM. The first thing we did was tell the CTO to stop pushing changes. The team had been pushing fixes through the afternoon — a config tweak here, a rollback attempt there — and each push was making the picture muddier. We needed thirty minutes of frozen state to read the system.
What we triaged in the first 30 minutes:
- What was on fire: production DB memory pressure, sign-up flow 500-ing, no working staging.
- What was not on fire but was load-bearing: the application servers themselves (they were timing out, but they were healthy — the timeouts were downstream), DNS, the CDN, the third-party billing integration.
- What we were going to deliberately leave alone: the Pulumi config. The staging environment was broken but it wasn’t on the launch path. Trying to fix it under pressure was a higher-risk move than living without it for 60 hours.
The slow-query log finding came in at 4:38 PM. We had pulled pg_stat_statements ordered by total_exec_time:
total_exec_time | mean_exec_time | calls | query (truncated)
---------------------+------------------+-------+----------------------------------
4,127,488 ms | 41,275 ms | 100 | SELECT u.id, ue.event_type, ...
| | | FROM users u
| | | JOIN user_events ue ON ...
| | | LEFT JOIN weekly_agg wa ON ...
41 seconds per call. One hundred calls in roughly an hour. That was the database.
By 4:47 PM we had the ModSecurity audit log open and we could see the 932240 rule firing on the JSON body of POST /api/v1/onboarding. The rule was matching on the structure of the goals array, which contained objects with numeric target_minutes fields in a range the rule’s heuristic was treating as a probe. Not malicious. Just unusual enough for an over-tuned default rule.
At 4:54 PM the first mitigation landed: we whitelisted the specific path for that rule at the WAF layer (path-scoped, not global; we’d revisit the broader CRS posture later), which restored the sign-up flow immediately. That was 47 minutes from engagement start to first customer-visible fix.
At 5:12 PM the second mitigation: we killed the long-running insights query sessions, set a statement timeout of 8 seconds on the application’s database role (defensive, not the actual fix), and reverted the “weekly insights” feature behind a feature flag the team already had wired up but had been leaving on. The application engineer — on a separate call, increasingly awake — pushed the flag toggle. Database memory recovered over the next 40 minutes as the queued queries drained.
At 6:21 PM Sev-1 was closed. Sign-ups were flowing, the database was steady, p95 was back under 400 ms. The staging environment was still broken. We left it.
Monday
Monday morning, 8:00 AM ET. The CTO had slept four hours. We had slept three. The DevOps lead had landed in Lisbon overnight on a flight he’d rebooked at 2 AM Portugal time, and was on a layover.
The decision tree for Monday was harder than Sunday. Sunday was triage; Monday was deciding what to actually fix in the 24 hours remaining, and what to leave for after launch.
What we touched:
- The insights query. The application engineer rewrote it. The new version pre-aggregated the weekly rollup in a background job and the dashboard query became a simple lookup against the rollup table. We added the index the original join had assumed. Shipped behind a 10% traffic flag for launch.
- The WAF. We replaced the Sunday-evening path whitelist with a proper rule exception scoped to the rule ID, with a comment. We did not turn off the CRS update channel; we logged the diff and added a synthetic that posted a sentinel onboarding payload every five minutes and alerted if the WAF started 500-ing it again.
- The database.
log_min_duration_statement = 1000msand the slow-query log piped to our monitoring. We did not change instance class — they were on a defensible size for the projection — but we doubled the read-replica capacity for launch week as a hedge. - Application server scaling. They were on autoscaling but the max was calibrated for the pre-launch baseline. We tripled the ceiling. Cost for the week was negligible against the launch stakes; we logged a planned scale-back date.
What we left alone:
- The staging environment. The Pulumi sync was still broken. The DevOps lead had a half-written PR on the config repo that was supposed to fix it; we did not want to merge it cold. Their developer pushed the insights fix to a one-off ephemeral environment we provisioned by hand against a copy of production data, and we tested it there. Less convenient, much safer.
- The CRS update channel. We considered pinning to the previous CRS minor. We decided against it — a pin would have introduced a different risk surface (known-stale rules during launch week), and the path-scoped exception was the smaller blast radius.
- The on-call setup. Their PagerDuty was wired weirdly. We were not going to rewire it 30 hours before launch. We added ourselves as a webhook target for the duration and put a Stack Harbor senior on the pager personally.
Communication was tight. One Slack channel with five people in it — the CTO, the application engineer, two Stack Harbor engineers including the senior on Sev-1, and (asynchronously, from Portugal) the DevOps lead. No standups. Posts when something changed.
By 8 PM Monday we had a launch-ready state. Database steady at 30% memory headroom. Sign-up flow exercising cleanly against production. CDN warm. Autoscaling ceiling set. Senior engineer assigned to carry the pager from midnight through Tuesday evening. We told the CTO to sleep.
Launch day
Tuesday. The TV segment aired at 8:42 AM ET. Paid social pushed in the 30 minutes leading up to the segment, the app-store feature went live at 9. Traffic came in steeper than the projections.
From 8:30 to 9, traffic ramped from baseline (~200 concurrent) to ~1,200. p95 stayed under 320 ms. The WAF logged a handful of CRS 932240 hits on the now-excepted rule — confirming the exception worked — and zero unexpected blocks. The press-hit hour peaked at ~3,400 concurrent. Autoscaling brought four additional application nodes online; the ceiling held. p95 nudged to 380 ms briefly, settled at 340.
At 10:14 AM, the one moment of tension. The dashboard endpoint — with the rewritten insights query, still behind the 10% flag — started showing p95 drift up toward 600 ms. Not breaking, but moving in the wrong direction. The Stack Harbor senior on the pager paged the application engineer, who identified that the rollup background job had not yet run for users who had signed up in the past hour, so the query was falling back to a slower path for new users only. We flipped the flag from 10% to 0% for the next four hours, told the engineer to fix it after the launch peak passed, and moved on. The flag flip took 90 seconds. No customer noticed.
Traffic stayed elevated through the morning, tapered through the afternoon, ramped again in the evening as US East-coast traffic hit. Site held. Database held. The hedge replica earned its keep on two reporting queries.
We’d built buffer for things that didn’t happen. The autoscaling ceiling could have absorbed twice the traffic. The hedge replica was overprovisioned. The engineer had a hot-fix branch for the insights query we never used. That’s the deal with launch-day prep — most of what you build, you don’t use. You build it so you don’t notice the one thing you did need.
By 11 PM Tuesday the traffic was past peak. The CTO posted a single message in the channel: “thank you. tomorrow.”
Post-launch
Wednesday morning we wrote the postmortem.
It went out to the company on Friday — written jointly by the application engineer, the DevOps lead (now home and rested), and one Stack Harbor senior. Three causes, one consequence, what we did about each of them, what we’d do differently. The document was 2,400 words and named the rule ID, the slow query, the Pulumi sync error, and the people involved. It was not heroic. It was a list of unglamorous decisions made under pressure, in order.
The conversation that turned the engagement into a retainer happened on the postmortem call. The CTO’s question was not “can you keep doing this” — it was “we cannot afford to be in that Sunday again, and we cannot afford to build the function that would have prevented it. What does it look like to have you on the pager instead of us?” We scoped a Monitoring/Support retainer over the following ten days. Trained on-call rotation for Sev-2 and routine; a Stack Harbor senior carries Sev-1. Acknowledged response targets, monthly reliability review, restore tests against their backups, slow-query monitoring, WAF rule-update review before propagation. The retainer started in their month two.
In the first 90 days under the retainer, three things happened that mattered. The staging environment got rebuilt properly — not under launch pressure, with a Pulumi cleanup we co-owned with the DevOps lead. The CRS update channel got a proper review-and-test pipeline. And the insights query, which had nearly broken the launch, became the first runbook in their incident library — “symptom, first-look checks, mitigation, escalation, what this runbook does NOT cover” — written by the application engineer with our edits. The runbook was executed once in month two, against a different slow-query pattern. It worked.
What an emergency engagement teaches you
You can’t drop into a system cold and be all-knowing. You can drop in cold and stop the bleeding while learning the shape of the system, and that is mostly what we do on a Sunday afternoon. The trick is not technical brilliance. The trick is sequencing: triage before fixes, freeze state before changes, smallest blast radius first, leave the things that aren’t on the launch path alone.
The other thing an emergency engagement teaches you is that the incident itself is the cheapest training data you’ll ever get about a system. By Tuesday night we knew their stack better than most vendors know a client at six months — not because we were brilliant, but because we’d been inside it under pressure for sixty hours, and pressure surfaces shape fast.
If your team is a small one and your product is approaching a moment that the team cannot afford to fail, the time to scope a Monitoring/Support relationship is before the moment, not during it. We took the Sunday call because that is what senior operators do. We would prefer, for everyone’s sake, to take the Monday-three-weeks-out call instead.
This is an example scenario: an illustrative engagement that shows how we approach this kind of work. It does not describe a specific client, and its figures are illustrative.
If your team is heading into a launch and the floor is moving, reach us on the Monitoring/Support path or read more about Monitoring and Support.