PB-2401: Slow call to another service while the visitor waits
Paul Bunyan code PB-2401 (Warning): Slow call to another service while the visitor waits. What it means and what to do.
On this page
What it means
Code called another server during a page or AJAX request, waited for the answer, and it took longer than the slow-call threshold.
What to do
Move the call to a background job, keep a copy of the answer for a while, or set a short timeout.
Common causes
- A plugin checking a license, fetching news or an API on every page view.
- Social share counts, review widgets or currency rates fetched live while the visitor waits.
- A payment, shipping or tax service called during cart and checkout.
- The other service being slow or down, so every call waits for the full timeout.
How to find and fix it
- The message names the address called and the code that made the call.
- If the answer doesn't change by the second, keep a copy (a transient or the object cache) and reuse it for a few minutes or hours.
- Move calls that the visitor doesn't need to see the page into a background job.
- Set a short timeout, so a slow or failing service can't hold the page for 5 to 30 seconds.
- Calls that fail every time (PB-2402) should be fixed or removed.
Details
| Code | Severity | Group |
|---|---|---|
| PB-2401 | Warning | Outside call |
