LLM Service Outages: Root Cause Analysis and Resilience Architecture Practices
When a large language model (LLM) service goes down, the root cause is rarely just insufficient compute—it usually exposes systemic gaps in capacity planning, overload protection, dependency isolation, and task recovery. This article dissects a large-scale LLM service outage, explains why online model services are especially prone to cascading failures, and classifies their root causes into five types. It then lays out resilience practices for both sides of the call: server-side capacity planning, request scheduling and rate limiting, circuit breaking and degradation, failure-domain isolation, and async task checkpointing; plus client-side retry and backoff, idempotency, stream resumption, and local-first consistency. It also covers observability, user-facing incident communication, and a self-check checklist for enterprise callers.
1. Incident Review: A Technical Reading of the Symptoms
Recently, a large model online service experienced a widespread outage, with various clients reporting errors simultaneously within the same time window:
- The web client stalled on load, and message sending failed;
- Mobile client sessions were interrupted mid-conversation;
- The developer-facing API continuously returned error codes;
- Service status monitoring showed that the main service, the code assistant service, and the underlying model cluster all exhibited varying degrees of abnormality.
A few accounts could access intermittently, but with poor stability. Paying users were not spared either; document processing and material organization in progress were forced to stop. Developers reported that the business error codes returned by the API indicated requests were rejected on the platform side, and business workflows could not complete. As of this writing, the service provider had not released an incident explanation nor provided a repair timeline.
From public records, this platform had previously experienced service disruptions multiple times. For example, when a new model launched, instantaneous traffic approached the cluster’s capacity ceiling, and the platform temporarily tightened individual subscription access; during subsequent model iterations, there were also API rate limiting and quota accounting anomalies, for which the platform publicly apologized.
This article does not evaluate any specific vendor, but instead treats such events as a typical microcosm of large model online services scaling up. It dissects the causes and provides resilience design approaches that both service providers and callers can reference.
From an engineering perspective, three details are worth noting.
- The failure is systemic, not a single point. The web, mobile, and API clients were affected simultaneously, indicating the problem lies in the shared core path (access gateway, inference cluster, or their dependent components), rather than the frontend implementation of any single client.
- “Intermittent availability” is a typical sign of capacity overload. A few requests succeeding while most fail usually means resources are exhausted or overload protection has been triggered, with the system dropping part of the requests to maintain basic operation. This also explains why failures often manifest as “sometimes working, sometimes not,” making it hard for users to tell whether the issue is their own network or the platform.
- The impact concentrates on interaction-intensive scenarios. Tasks like long document parsing and code writing often last several minutes and rely heavily on streaming output. Once the connection breaks, the time and compute already invested are wasted, and the user-perceived loss is far greater than a normal query failure.
2. Why LLM Online Services Are More Prone to Cascading Failures
Traditional web service requests are usually “read once, return once,” taking milliseconds per call and easily scaled horizontally by adding stateless replicas. LLM online services differ in several ways:
- Request profiles follow a long-tail distribution. Input context length and output length cannot be determined in advance, ranging from a one-sentence Q&A to a dozens-of-pages document summary—differing by orders of magnitude.
- Inference is compute-intensive, and output is unpredictable. Using autoregressive generation, the system must first complete the prefill stage over the long input, then decode token by token. Each decoding round depends on the intermediate states of all previous tokens (KV Cache), so a single request may occupy compute and GPU memory for a long time.
- The dependency chain is longer. Besides model inference, it also involves authentication, billing, session management, file parsing, vector retrieval, and security review, among other side services—any of which can amplify into a full outage when abnormal.
- The peak-to-trough traffic ratio is large. New model launches, new feature releases, and hot events can all bring instantaneous pulse traffic, while compute resource scaling takes time. During the scaling window, if queueing and rate limiting mechanisms are lacking, backlogs propagate back along the call chain.
- Once a long task is interrupted, the cost is high. A long conversation often spans multiple interaction rounds and also involves documents and code context the user has uploaded.
Stacking these factors together, LLM services are more prone to availability problems during traffic peaks. The “tight compute resource scheduling” mentioned in the incident above is a direct manifestation of this contradiction.
3. Classifying Root Causes: From Symptoms to Diagnosis
Typical LLM online service failures can be grouped into five categories, each with relatively clear troubleshooting signals.
| Failure type | Typical symptoms | Troubleshooting signals |
|---|---|---|
| Capacity | Longer queues, more timeouts, rate-limiting errors | Concurrent requests and queue length keep climbing; time-to-first-token rises significantly |
| Dependency | Specific features unavailable, or error codes concentrated in one stage | Downstream component error rate and latency anomalies; failure scope aligns with dependency boundaries |
| Change | Failure appears suddenly after a release, config change, or model switch | Failure timing closely matches change records; clear behavioral difference between old and new versions |
| Resource | Errors concentrated on long-context requests, or long tasks failing in clusters | Excessive GPU memory usage, with records of out-of-memory or forcibly terminated processes |
| State | Users see garbled content, quota accounting anomalies, or counter drift | Billing records inconsistent with request logs; the same session showing different states on different nodes |
Among these five, capacity and dependency types are the most common, the change type is the easiest to locate, while resource and state types tend to be subtle and require metric comparison and consistency checks to detect.
For callers, they can also judge which stage a request was rejected at based on the layer of the error code:
- Connection establishment failure (e.g., connection timeout, connection refused): the request did not reach the application layer;
- HTTP status code 5xx: the request reached the server, but the server failed to process it;
- Business error code: the request was received by the server but was intercepted at stages such as identity verification, quota checking, or security review.
4. Server-Side Resilience Design
4.1 Capacity Planning: Turning the “Unpredictable” into the “Estimable”
The core of capacity planning is converting uncertain business traffic into definite resource requirements. A simplified estimation model is as follows:
Required concurrent slots ≈ Peak QPS × Average per-request occupancy duration (s)Required GPU memory ≈ Σ(model weights + per-request KV Cache + runtime overhead)Required decode throughput (tokens/s) ≈ Peak token generation rate × (1 + safety margin)
KV Cache occupancy is approximately proportional to “context length × concurrency,” so long-context services must separately reserve a GPU memory budget.
A typical deployment pattern separates Prefill and Decode: the prefill stage is compute-heavy and short; the decode stage is memory-access-intensive and long. Deploying the two into different resource pools, scaling and scheduling them separately, can prevent a single ultra-long-context request from blocking the decode of an entire batch.
For resource orchestration:
- Combine reserved baseline compute with elastic compute. Use reserved capacity for predictable baseline traffic and elastic resources for burst peaks, with the ratio determined by the historical peak-to-trough ratio.
- Trigger auto-scaling based on business metrics. Scale on queue length and request queueing time—metrics that directly reflect user wait—while accounting for scaling time, so resources are added ahead of demand rather than behind it.
4.2 Request Scheduling: Admission Control, Prioritization, and Rate Limiting
Under overload, the worst approach is “accepting everyone”: all requests enter the queue and eventually time out together. A more robust approach is to actively manage requests:
- Admission control. At the entry point, decide whether to accept, queue, or quickly reject based on current load, and clearly inform the caller.
- Prioritization and queue isolation. Distinguish interactive requests from batch tasks, and use separate queues for long and short tasks to prevent a few long requests from occupying all decode resources.
- Multi-level rate limiting. Set rate limits separately at the access layer, gateway layer, and inference service layer: a global concurrency semaphore limits in-flight requests, tenant-level quotas prevent individual callers from crowding out shared resources, and a token bucket smooths burst traffic.
Example gateway rate-limiting pseudocode:
MAX_CONCURRENT = 800 # Determined by the safe concurrency ceiling found via load testingdef handle_chat(request):if not limiter.allow(request.tenant_id):# Fail fast and tell the caller a suggested retry timereturn error_response(code=429, retry_after_seconds=2)if in_flight_count() >= MAX_CONCURRENT and request.is_interactive:return error_response(code=503, retry_after_seconds=3)with concurrency_slot(timeout_ms=8000): # Queue for a slot, reject on timeoutreturn inference_engine.run(request)
In addition, the generation process contains a complete reasoning chain, with many decode rounds and long duration, so resources should be metered by actual output tokens rather than just request count.
4.3 Circuit Breaking, Isolation, and Degradation
- Circuit breaking: Enable circuit breakers for continuously failing dependencies (such as file parsing and vector retrieval), failing fast directly for a period of time to avoid request threads piling up and triggering cascading failures.
- Isolation: Isolate the blast radius across tenants, business lines, and model versions through independent resource pools, independent threads, or processes.
- Degradation: Prepare tiered degradation plans, for example:
- When context is too long, automatically truncate or use rolling summaries, keeping only key fragments;
- Temporarily disable non-core enhancement capabilities (web retrieval, tool calls);
- When queues are too long, accept only short-output requests;
- In extreme cases, switch to a smaller-parameter backup model to preserve basic availability.
Degradation strategies should be configurable, enableable with one click, and cover supporting logic such as frontend/backend prompts and billing rules.
4.4 Failure-Domain Isolation and Multi-Active Deployment
Inference services should be deployed across at least multiple availability zones to avoid a single data center failure causing a full outage. A further step is cross-region multi-active deployment, using global traffic scheduling to distribute requests by region and synchronizing session data across regions.
Such approaches require additional resource and operational costs; whether to adopt them depends on the business’s availability requirements. But cross-availability-zone redundancy should be treated as a baseline capability for online services.
4.5 Task Asynchronization and Checkpoint Recovery
Long-running tasks like long-text processing and code generation should not rely on maintaining a single synchronous connection from start to finish. A more reasonable approach is to model them as asynchronous tasks:
- The client submits a task and immediately receives a task identifier;
- The server advances stages such as parsing and generation, persisting intermediate results to object storage;
- The client polls or subscribes to progress, and resumes by task identifier after a connection break.
# Submit stage: return the task identifier immediatelytask = task_service.submit(input_ref=upload_ref, # Location of the input file in object storageparams={"max_tokens": 4096},stages=["parse", "summarize", "format"],)return {"task_id": task.id, "status": "queued"}# Advance stage: persist intermediate results after each stage completesfor stage in task.stages:result = executor.run(stage, input=task.last_result_ref())state_store.save(task.id, stage, result) # Write to persistent statetask.mark_done(stage)# Resume stage: after a service restart or connection break, continue from the last completed stagetask = task_service.resume(task_id)
Session data is the same and should not be stored only in a single instance’s memory. Using a distributed cache or message queue to host session state, when one node fails, requests can switch to another node and continue processing.
5. Client-Side Resilience Design: Letting Applications Gracefully Withstand Failures
Server-side resilience determines how long a failure takes to recover; client-side resilience determines how much users lose during the failure. For enterprises that have already embedded LLMs into production and office workflows, the latter is equally critical.
5.1 Error Code Classification and Retry Strategy
First, be clear: which errors can be retried, and which cannot.
- Non-retryable: errors where the request itself has a problem, such as invalid parameters or authentication failures; retrying only wastes time and amplifies pressure;
- Retryable: network jitter, connection breaks, and rate-limiting or temporarily unavailable errors returned by the server.
Among retryable errors, there are two semantics to distinguish: if the error explicitly gives a suggested wait time (rate-limiting errors usually carry a Retry-After response header), follow it preferentially; otherwise use exponential backoff with random jitter to avoid many clients retrying at the same time and forming a retry storm, which would in turn overwhelm the just-recovered service.
import random, timeRETRYABLE = {429, 500, 502, 503, 504}def call_with_retry(fn, max_attempts=4, base=0.5, cap=8.0):last_error = Nonefor attempt in range(max_attempts):try:return fn()except APIError as e:last_error = eif e.code not in RETRYABLE or attempt == max_attempts - 1:raiseif e.retry_after is not None:delay = e.retry_after # Prefer the server's suggestionelse:delay = min(cap, base * (2 ** attempt))delay += random.uniform(0, delay * 0.3) # Jittertime.sleep(delay)raise last_error
For long-running generative requests whose billing is strongly correlated with generation, it is recommended to set a retry budget (e.g., no more than 10% of total requests) to prevent retry traffic from exceeding normal traffic in extreme cases.
5.2 Idempotency Keys and Duplicate-Charge Prevention
Generative requests usually lack natural idempotency, and blindly retrying may cause duplicate charges or even duplicate business records. Callers should generate a unique identifier (such as a UUID) for each business operation and submit it with the request, so the server can identify duplicate requests within a time window and reuse the original result.
# Caller generates a unique identifier and persists it, reusing it on retryidempotency_key = storage.get_or_create(f"op:{order_id}")try:result = call_with_retry(lambda: chat_api.create(messages=msgs,idempotency_key=idempotency_key, # Passed along with the request headerstream=True,))storage.save_result(idempotency_key, result)except APIError:# Keep the identifier after failure: after recovery, query the previous request's result by identifierstorage.save_pending(idempotency_key, msgs)
At the same time, the server’s billing records should support reconciliation by request identifier. This both ensures billing accuracy and quickly locates the affected scope when quota accounting anomalies occur.
5.3 Stream Response Resumption
Streaming output significantly improves experience but is also more fragile in the face of network jitter and server anomalies. A single connection break may mean hundreds of already-generated tokens are all discarded. Therefore, it is recommended to:
- Use standard resumption semantics. For SSE-based APIs, the server can assign an incrementing sequence number to each event, and after a disconnection the client can send a request carrying the last received event number, with the server continuing to push from that break point.
- Save generation snapshots on the server. Using the request identifier submitted by the client as the key, periodically save the generated content. When the client reconnects, the server verifies whether the identifier and context are consistent; if consistent, it resumes, otherwise it prompts the user to re-initiate.
- Do client-side deduplication well. Because “exactly-once” delivery cannot be guaranteed, the client should deduplicate by event sequence number. For example, use a standard Map to store received fragments, ensuring correct render order and content completeness.
// Disconnection detection and resumption examplelet lastSeq = 0;let chunks = new Map(); // event sequence number -> text fragment, avoiding duplication or reorderinglet retry = 0;function connect(resumeFrom = lastSeq) {const es = new EventSource(`/v1/chat/stream?request_id=${requestId}&after=${resumeFrom}`);es.onmessage = (e) => {const ev = JSON.parse(e.data);lastSeq = ev.seq;chunks.set(ev.seq, ev.delta);render([...chunks.keys()].sort((a, b) => a - b).map(k => chunks.get(k)).join(''));};es.onerror = () => {es.close();// Backoff reconnect: 1s, 2s, 4s... max 15sconst delay = Math.min(1000 * 2 ** retry++, 15000);setTimeout(() => connect(lastSeq), delay);};}
5.4 Multi-Client Consistency and Local-First
The web client, mobile client, and API usually share the same session data. During server anomalies, messages may be sent but not persisted, or multi-client state may become inconsistent. A practical principle is “local-first”:
- The user-submitted message first gets a temporary identifier locally and is displayed immediately, while being written to local storage;
- The request is sent in the background, and on success the temporary identifier is replaced with the server-returned message identifier;
- Failed messages enter an offline queue, preserving the original text, to be automatically resent after service recovery or manually retried by the user;
- During multi-client sync, the server message list is authoritative, merging based on local temporary identifiers and sent status.
// Local-first send: persist locally first, then sync to serverasync function sendMessage(text) {const localId = uuid();const msg = { id: localId, role: 'user', text, status: 'pending' };saveLocal(msg); // Write to local storagerender(msg);try {const sent = await chatApi.sendMessage({ text, idempotency_key: localId });updateLocal(localId, { id: sent.id, status: 'sent' });return sent.id;} catch (e) {updateLocal(localId, { status: 'failed' }); // Keep content, retryablequeueForRetry(localId, text);}}// Multi-client sync: local-first + server reconciliationfunction mergeMessages(localMsgs, remoteMsgs) {const remoteIds = new Set(remoteMsgs.map(m => m.id));const reconciled = localMsgs.map(m =>m.status === 'sent' && !remoteIds.has(m.id) ? { ...m, status: 'failed' } : m);return [...reconciled, ...remoteMsgs.filter(m => !reconciled.some(l => l.id === m.id))];}
6. Observability: Making Failures Visible and Explainable
The first step in handling failures is detection and localization. An observability system for LLM services should cover at least four layers:
- Access layer: request volume, success rate, end-to-end latency;
- Inference layer: time-to-first-token, decode speed (tokens/s), batch size, GPU memory usage, KV Cache hit rate;
- Resource layer: compute resource utilization, instance health, auto-scaling events;
- Business layer: success rate and error code distribution segmented by model version, user type, and API type.
Example metric definitions:
slis:- name: chat_availabilitydefinition: non-5xx chat requests / total chat requeststarget: 99.9% # 30-day rolling window- name: stream_success_ratedefinition: normally ended event streams / initiated event streamstarget: 99.5%- name: first_token_latency_p95definition: P95 of time from request dispatch to receiving the first tokentarget: 2salerts:- name: availability_burn_rateexpr: error budget burn rate over last 1 hour > 14.4 # Exhausts 2% of monthly budget within 1 hourseverity: P1- name: queue_backlogexpr: inference queue length > 5000 for 3 consecutive minutesseverity: P2
For alerting strategy, it is recommended to use the “error budget burn rate” of service level objectives as the core basis, rather than isolated static thresholds. The burn rate considers both error rate and impact duration, can issue warnings in the early stage of a failure, and can also reduce ineffective alerts.
At the same time, each log should carry a request identifier spanning the entire chain. When a user reports “the session was interrupted mid-way,” one can quickly reconstruct which services this request passed through and at which stage it failed.
7. User-Facing Incident Communication and Transparency
Beyond the technical problem, incident communication also affects user trust. In the incident, paying users not only faced service interruption but also progress loss and an information vacuum. Standard practices include:
- A clear status page. Publish the operating status and historical availability of each service component, letting users judge the source of the problem themselves;
- Tiered announcements. During the failure, periodically update the impact scope, temporary workarounds, and estimated recovery time, and release a postmortem after the fix;
- Making generated content preservable. Provide auto-save and version records for key results (documents, code) to reduce losses from session interruptions.
For commercial services that promise availability via a Service Level Agreement (SLA), continuous interruptions may trigger corresponding service credit or compensation clauses. Specific terms should be clearly agreed upon at the procurement stage, and in case of disputes the agreement prevails.
8. A Resilience Self-Check Checklist for Enterprise Callers
- Retry and backoff: Distinguish retryable from non-retryable errors, use exponential backoff with jitter, and set a retry budget for generative requests.
- Idempotency and reconciliation: Generate an idempotency key for critical business operations, and periodically reconcile request records with billing records.
- Checkpoint resumption: Execute long-text and code tasks asynchronously, preserve intermediate results, and support resuming from checkpoints.
- Multi-client state: Reconcile across clients based on the server message list, and keep the original text of failed messages locally.
- Graceful degradation: Prepare backup models, cache fallbacks, feature degradation, and other plans, so the core path does not depend on a single service.
- Metrics and alerts: Define key service metrics and alert rules, and regularly drill failure scenarios.
For businesses with high reliability requirements, a multi-model routing strategy can also be adopted: automatically switch to a backup model or backup path when the primary model is unavailable, and shield the differences between different APIs in protocol and error codes through a unified abstraction layer.
9. Conclusion
LLM services are moving from “being able to chat” to “being able to work,” embedding into real production workflows such as document processing and code writing. User expectations have also shifted from “how smart the answers are” to “whether it is stable and reliable.”
A large-scale outage often exposes not just insufficient compute, but systemic weaknesses in capacity planning, overload protection, dependency isolation, task recovery, and incident communication.
For service providers, elastic compute pools, tiered degradation plans, cross-availability-zone failure-domain isolation, and transparent status disclosure form the foundation of commercial service reliability. For callers, reasonable retry, idempotency, resumption, and degradation design are the last line of defense against external uncertainty. Only when both ends work together can LLM services truly become dependable productivity infrastructure.
