LLM Service Outage Post-Mortem: Technical Breakdown and High Availability Practices

    This article analyzes a large-scale LLM service outage that recurred over two evenings and took nearly twelve hours to fully resolve. It breaks down the common failure modes behind "server busy" errors in online inference systems, including queue buildup, retry storms, batching trade-offs, long-context head-of-line blocking, and dependency jitter. It then outlines stability practices such as layered rate limiting, adaptive batching, retry budgets with exponential backoff, usable fallback paths, observability dashboards, and capacity planning with regular drills. Readers will learn how to turn root causes into verifiable engineering constraints that reduce time to resolution.

    1. Incident Overview: What an Access Failure Reveals About Online Inference Systems

    An AI coding tool experienced large-scale access failures on two consecutive evenings. Users saw conversation requests return messages such as “check your network and try again” or “server busy,” affecting both mobile and web clients. Each recovery cycle lasted nearly twelve hours, with a pattern of brief relapse after the first fix and full convergence only after a second repair the next day. Once the brand and specific timing are removed, this is a typical LLM service stability case whose technical implications are worth unpacking layer by layer.

    The key point is that such failures are rarely a single component going down. They are usually the result of multiple layers of buffering being punched through one after another. The request entry point, authentication and quota, scheduling queue, inference execution layer, and dependent storage and cache can each amplify queuing latency. Any such amplification propagates back along the call chain and finally surfaces to users as the catch-all “busy” message.

    Three signals stand out from the timeline:

    • About two hours from first detection to first fix: the alerting pipeline worked, but localization was coarse and lacked latency attribution broken down by stage.
    • Relapse within an hour of the first fix: the first response was likely just a restart or scale-out that did not remove the root cause, such as hot requests, queue backlog, or dependency jitter.
    • Full recovery only the next day: a structural gap existed between capacity and the traffic model, requiring a change rather than a temporary operation to close it.

    2. Failure Mode Breakdown: Why It Gets Slower the Busier It Gets

    1. Queuing and Tail Latency Amplification

    Online inference requests arrive in bursts while execution resources are relatively fixed. When the arrival rate briefly exceeds the service rate, queue length grows linearly and waiting latency rises with it. If timeouts are set too long, clients keep retrying and create a retry storm that inflates effective load further. This is the most common cause of the “busy” message.

    2. The GPU Memory and Batching Dilemma

    Inference services typically use dynamic batching to improve throughput, but larger batches mean each request waits longer to form a batch. Under high load, continuing to pursue large batches sharply worsens tail latency; switching to small batches lowers throughput and congests the queue even more. Without an adaptive batching strategy, the system oscillates between these two extremes.

    3. Non-Linear Cost from Context Length

    Input length distribution for conversational workloads is highly uneven. Long-context requests consume far more compute and GPU memory than short ones. Once long requests arrive in a cluster, they occupy execution slots for extended periods and create head-of-line blocking, slowing subsequent short requests indiscriminately.

    4. Dependency Jitter and Cache Breakdown

    If dependencies such as authentication, quota, session storage, and vector retrieval experience jitter from milliseconds to seconds, high call frequency amplifies it into an avalanche. If the cache layer lacks mutex-based rebuilds and expiration jitter, a cluster of hot keys expiring at once instantly pushes the load onto the backend.

    3. Stability Design: Containing Uncertainty

    1. Layered Rate Limiting and Priority Scheduling

    Apply token bucket rate limiting at three dimensions: entry, tenant, and API. Assign separate queues to different priority levels so low-priority batch jobs cannot crowd out interactive traffic.

    1. Entry layer: global QPS cap + burst bucket
    2. Tenant layer: tokens allocated by quota; excess is queued or rejected
    3. API layer: tiered by input length, with long requests in a separate queue

    2. Adaptive Batching and Length Tiering

    Route requests to different execution pools by context length. The short-request pool targets low latency while the long-request pool targets high throughput, eliminating head-of-line blocking at the source. Adjust batch size dynamically based on real-time queue length instead of using a fixed constant.

    3. Timeouts, Retries, and Backoff

    Retries must use exponential backoff with jitter and a retry budget to prevent self-amplification during an incident. For non-idempotent or high-cost requests, fail fast with an understandable message rather than letting them hang for a long time.

    1. # Example: retry with jitter and budget
    2. import random, time
    3. def call_with_retry(fn, max_attempts=3, budget=5.0):
    4. deadline = time.time() + budget
    5. for i in range(max_attempts):
    6. try:
    7. return fn()
    8. except TransientError:
    9. if i == max_attempts - 1 or time.time() >= deadline:
    10. raise
    11. time.sleep(min(2 ** i, 4) * (0.5 + random.random()))

    4. Fallback Paths Must Be “Usable,” Not Just “Present”

    A fallback is not a single error message. It should provide a genuinely useful alternative: switch to a smaller, faster model, return a cached historical result, or convert an interactive request into an asynchronous task with an estimated completion time. Fallback switches should support gradual rollout by tenant and by API.

    4. Observability: Cutting Localization from Hours to Minutes

    The biggest cost of stability incidents is localization, not repair. Build four dashboards:

    • Latency breakdown: instrument entry queuing, scheduling wait, execution time, and dependency calls separately to locate which layer is the bottleneck.
    • Queue and saturation: queue length, batch size distribution, GPU memory usage, and execution slot utilization.
    • Dependency health: success rate, timeout rate, and jitter percentiles for each dependency.
    • User-side signals: the proportion of catch-all messages, broken down by client and region, as a leading indicator of real experience.

    Alerts should trigger on multiple windows and multiple conditions to avoid noise from a single spike. Bind a runbook to each alert type that spells out which dashboard to check first and which action to take first.

    5. Capacity and Drills: Making Recovery Time a Budgetable Metric

    Capacity planning cannot rely on averages alone. Use peak percentiles and the share of long-context requests as inputs, reserve burst headroom, and run load tests regularly to calibrate the model. More importantly, make drills routine: randomly remove execution nodes, inject dependency latency, and simulate hot key expiration to verify that rate limiting, fallback, and retry budgets work as expected.

    The most valuable output of a post-mortem on a nearly twelve-hour outage with a relapse is not “fixed.” It is turning root causes into verifiable engineering constraints: queue caps, batching strategy, timeout budgets, fallback coverage, and alert accuracy. When these metrics are continuously measured, service availability and recovery time truly enter a governable range.