Skip to content
Diamond Sierra

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.

Updated · By Diamond Sierra

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

  1. The message names the address called and the code that made the call.
  2. 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.
  3. Move calls that the visitor doesn't need to see the page into a background job.
  4. Set a short timeout, so a slow or failing service can't hold the page for 5 to 30 seconds.
  5. Calls that fail every time (PB-2402) should be fixed or removed.

Details

CodeSeverityGroup
PB-2401WarningOutside call