Where checkout time goes
A checkout request spends time in four places: web's own handling (milliseconds), the database (two short queries, usually under 25 ms each), waiting for a database connection when the pool is busy, and the payments call. The payments call usually dominates.
Triage
- Compare web's
/checkoutp95 with checkout'spayment_call_duration_secondsp95 and payments'payment_provider_request_duration_secondsp95. If provider latency explains the checkout latency, the problem is the card provider (rb-008). - Check
db_pool_waiting. Requests waiting for a connection add up to one second each before they fail. - If only some web requests are slow and product pages are slow too, the problem is in web or the host, not in checkout.
Do not
- Do not raise the pool size to fix latency caused by a slow provider: more connections held while waiting does not make the provider faster.