LLM Service Failures: Troubleshooting and Overload Management
Learn how to distinguish LLM service outages from capacity saturation, KV cache pressure, dependency failures, and configuration changes. This guide outlines a practical troubleshooting sequence, overload protection strategies, and capacity planning practices that help preserve critical workloads and make incidents easier to diagnose.
Why LLM Services Often Appear to Crash
Online large language model (LLM) services behave differently from traditional web APIs. A single request can consume substantial GPU memory, run for seconds or tens of seconds, and continuously access context caches during generation. Users may experience a long wait for the first token, interrupted responses, rising error rates, sharply increasing queue times, or even failed health checks.
These symptoms are often described as a “service crash.” In practice, the cause is frequently resource exhaustion, overload protection, or unstable downstream dependencies—not the termination of every serving process.
Developers and enterprise users need a repeatable diagnostic framework rather than an assumption that the service has crashed: establish the scope of impact, distinguish capacity and cache issues from dependency failures and deployment changes, then protect critical workloads through rate limiting, graceful degradation, and capacity planning.
Classify the Symptoms First
Map user reports to observable signals instead of checking only whether a page loads.
- Reduced availability: Gateway 5xx responses, connection resets, and upstream timeouts increase. These signals indicate that requests are not completing normally; they do not establish that model weights are corrupted.
- Worsening latency: Queueing time, time to first token, and end-to-end generation latency all increase. Common causes include saturated inference instances and excessively deep batching queues.
- Failures in specific features: Short conversations work, while long-context requests, tool calls, or highly concurrent sessions fail. Investigate context caches, session state, and feature-specific routing.
- Uneven regional or cluster behavior: Some endpoints remain healthy while errors concentrate elsewhere. Prioritize scheduling issues, network partitions, and local capacity shortages rather than assuming a global application defect.
Classification narrows the investigation. Global failures point toward ingress, authentication, configuration, or shared dependencies. Localized failures point toward individual instances, queues, or data shards.
Capacity Is the Primary Constraint
LLM inference is typically constrained by accelerator memory and compute rather than CPU or disk capacity. Pressure commonly comes from three sources:
- Limited scaling flexibility. When training and inference compete for the same accelerator resources, online serving cannot necessarily add enough instances within minutes, as a stateless web service might.
- High per-request cost. Longer contexts and greater concurrency increase memory consumption and compute time. The same number of instances may therefore support substantially fewer requests per second.
- Changes in traffic composition. A surge in cache-heavy conversations, repeated follow-up requests, or batch calls can sharply reduce effective throughput even when the total request count has not doubled.
The fact that a service handled an earlier workload is not a capacity guarantee. Larger models, longer contexts, and more callers require a new capacity model rather than reuse of the previous version’s operating limits.
Capacity estimates should separately account for peak concurrency, average output length, the distribution of context lengths, acceptable queueing time, and sustainable per-instance concurrency at the target latency. Missing any of these inputs can distort scaling decisions.
How Cache Pressure Saturates a Service
Inference context caches, commonly implemented as key-value (KV) caches, avoid recomputing historical tokens. They reduce latency but also make accelerator memory a scarce resource.
A typical deterioration follows this sequence:
- Long conversations and multi-turn sessions keep caches resident for longer.
- Falling cache hit rates increase computation and slow request processing.
- New requests continue arriving, queues deepen, and timeouts increase.
- Timeout-driven retries amplify traffic, creating a positive feedback loop of overload.
There is no contradiction in a cache designed to accelerate inference making a service less responsive under pressure. Caching trades memory for computation. When memory runs short, the service must evict cached data, truncate context, or reject requests rather than retain everything indefinitely.
General mitigation measures include:
- Set cache retention policies by session importance, favoring active sessions with shorter contexts.
- Enforce hard limits on excessively long contexts and communicate those limits at ingress, rather than waiting for an inference process to run out of memory.
- Separate interactive requests from batch workloads so offline traffic does not consume cache capacity needed for online serving.
- Monitor cache occupancy, eviction counts, hit rates, and the proportion of recomputation caused by cache misses or eviction.
A Practical Troubleshooting Sequence
Do not begin by changing the model or restarting every instance. A more reliable sequence is to investigate scope, saturation, changes, dependencies, and finally process health.
1. Establish the Scope of Impact
Check whether errors and timeouts concentrate in particular regions, model versions, tenants, or business applications. If one caller is generating a retry storm, apply rate limiting at the gateway first.
2. Inspect Saturation Signals
Examine inference queue depth, in-flight requests, GPU memory usage, batch waiting time, and the number of ready instances.
A persistently nonempty queue combined with no increase in ready instances strongly suggests a capacity or scheduling problem.
3. Check Recent Changes
Compare the onset of the incident with changes to:
- Model versions
- Prompt templates
- Maximum length settings
- Batch sizes
- Timeouts
- Retry counts
- Routing weights
Many apparently sudden crashes are configuration changes that have increased the cost of each request.
4. Investigate Dependencies
Authentication, model files in object storage, logging and monitoring writes, message queues, and external tool calls can all affect serving. Any slow synchronous dependency can tie up inference workers.
Use dependency timeouts, bulkhead isolation, and fallback behavior to prevent secondary paths from overwhelming the primary generation path.
5. Inspect Process and Node Health
If instances restart frequently, devices report errors, or nodes become unschedulable, investigate hardware and runtime failures. Isolate affected nodes rather than repeatedly performing rolling restarts across the entire cluster.
A simple health model can distinguish a process that is running from an instance that can accept more work:
ready = process_alive AND device_available AND model_loadedaccepting = ready AND queue_depth < threshold AND gpu_memory_usage < thresholddegraded = ready AND NOT acceptingunavailable = NOT ready
Only include instances in the normal traffic pool when accepting is true. This prevents routing more requests to instances that are already overloaded.
Protecting the Service During Overload
The goal of stability is not to make every request succeed. It is to preserve a bounded, predictable level of successful service.
- Ingress rate limiting: Apply concurrency and request-rate limits by user, application, and API endpoint. Return a clear busy response with retry guidance when limits are exceeded, rather than encouraging immediate retries without delay.
- Request priorities: Prioritize critical business workloads and short requests. Delay batch jobs, very long-context requests, and non-real-time tasks, or move them to an asynchronous queue.
- Timeout budgets: Set progressively shorter timeouts from the gateway toward inference so downstream work does not continue after the upstream caller has abandoned the request.
- Retry controls: Retry only retryable errors, keep retry counts low, add jitter, and count retries against the same quota. Retrying timed-out requests can amplify overload.
- Graceful degradation: Disable nonessential tool calls, reduce maximum output length, switch to a smaller model, or focus on completing already-established sessions.
- Visible queueing: Show users that a request is queued or provide an estimated wait. This is less likely to trigger repeated submissions than an indefinite loading indicator.
These strategies do not require proprietary product interfaces. They can be implemented using gateways, container-platform readiness probes, message queues, and monitoring alerts.
Capacity Planning and Deployment Practices
Moving stability checks into the release process is more effective than relying on incident response alone.
- Establish load-test baselines. Test realistic context-length distributions and proportions of multi-turn conversations, not just short prompts. Record latency percentiles, error rates, and resource usage curves as a baseline for each version.
- Treat serving changes as capacity changes. Changes to models, templates, length limits, or batching parameters require canary rollout and comparison of queueing times.
- Separate reserved capacity from elastic capacity. Reserve stable instances for interactive serving and use a standby pool for traffic spikes. Include model-loading time in standby cold-start estimates; do not assume scaling takes effect immediately.
- Use replicas across failure domains. Distribute instances so maintenance or a local network problem does not make the entire service unavailable. If sessions are bound to instances, provide a plan for rescheduling and rebuilding their caches.
- Make incidents reconstructable. Request logs should record request IDs, model versions, context lengths, queueing times, cache-hit status, and final outcomes. Without these fields, post-incident analysis becomes guesswork.
Monitoring should cover at least error rates, timeout rates, queue depth, time to first token, GPU memory usage, ready-instance counts, and retry ratios. Set alert thresholds against established baselines rather than relying only on fixed absolute values.
When retry ratios rise while queues deepen, prioritize rate limiting before considering additional capacity.
What Enterprise Integrators Should Do
Applications that call LLM services should assume their upstream provider can become saturated. Practical measures include:
- Make non-real-time tasks asynchronous.
- Coalesce requests locally where appropriate.
- Configure client timeouts and backoff.
- Retry idempotent write operations cautiously.
- Prepare fallback messages or a rules engine for critical paths.
Binding the entire user experience to a single, synchronous, long-running generation turns a provider’s capacity fluctuations directly into an application outage.
Also distinguish service failures from output-quality problems. Timeouts and 5xx responses are availability issues. Irrelevant answers, truncated output, and formatting errors are more often model or prompt-design issues. Treating them as one category can leave infrastructure and model teams waiting on each other.
Post-Incident Review Checklist
After an incident, consistently answer these questions:
- What was the earliest abnormal signal?
- Which users and interfaces were affected?
- Was the cause capacity, cache pressure, a dependency, a change, or client retries?
- Did rate limiting take effect quickly enough?
- How long did additional capacity actually take to become available?
- Which requests were retried incorrectly?
- Which threshold should trigger earlier next time?
Record the findings in the operational runbook so they can guide the next response.
Conclusion
Widespread latency increases and errors in LLM services often occur when changes in traffic composition push compute and cache resources to their limits, with retries and long contexts amplifying the problem.
Classify the symptoms first, then investigate impact scope, saturation, recent changes, and dependencies. Protect critical requests with rate limiting, priorities, timeout budgets, and graceful degradation. Continuously assess capacity against realistic context distributions, use canary releases, and collect enough observability data to reconstruct incidents.
This approach turns an apparent crash into an engineering problem that can be explained, contained, and managed.
