Platform
Concurrent Apex requests exceeded: diagnose overlapping slow work
Investigate long-running Apex concurrency with timestamps, request overlap and current org limits rather than confusing it with CPU time.
Several slow requests can block new work even when each request remains below its CPU limit. Concurrency measures overlap across the org.
Salesforce’s concurrent-request event reference describes long-running synchronous Apex requests and the failures recorded when the org’s allowance is exceeded. The current governor reference makes the allowance dependent on qualifying license counts; ten is a floor, not a universal fixed limit.
Reconstruct the overlap window
Collect timestamps, request entry points and durations from available logs and monitoring. Identify which operations were active together when new requests began failing. A single stack trace won’t show that overlap.
Separate CPU time, database work, lock waits and external-call waiting. These are different measurements. The governor reference excludes HTTP callout processing time from the long-running concurrency calculation, so older advice that treats every slow callout as occupying the same limit can mislead the investigation.
Check whether a deployment, import or integration retry burst increased the arrival rate. A service that was tolerable at low traffic can become a concurrency problem when callers retry simultaneously.
Reduce both duration and arrival pressure
First inspect expensive synchronous work: repeated queries, large processing loops and lock contention. A shorter transaction reduces the time during which requests can overlap.
Then review the caller’s retry behavior. Repeated immediate retries can amplify a temporary failure. Use bounded retries with backoff where the operation’s semantics allow it, and preserve a stable request identifier so a retry doesn’t duplicate a write.
For work that doesn’t need an immediate result, evaluate an asynchronous boundary. Return an accepted operation identifier and let the caller inspect completion. Moving work to a queue changes the completion contract; it doesn’t make latency or capacity unlimited.
Validate under representative concurrency
A single-user smoke test can’t establish concurrency behavior. In an approved test environment, reproduce representative overlapping requests with realistic data and a controlled load profile.
Record successful requests, rejected requests and completion latency. Include a dependency slowdown and a retry burst. Stop conditions and test volume should be agreed with the system owner before load generation.
If your monitoring exposes ConcurrentLongRunningApexLimit events, use them to identify affected intervals. Availability depends on your org’s monitoring capabilities, so don’t assume every environment has the same event access.
The acceptance criterion is stable processing at the intended workload with bounded recovery. A lower average response time is useful, but it doesn’t prove that the slowest overlapping requests no longer exhaust the allowance.