Reading a Trace
A trace of one slow request shows these spans:
frontend POST /checkout 2.31 s └ checkout POST /orders 2.29 s ├ checkout db.acquire 2.21 s ├ checkout db.query 0.01 s └ payments POST /charges 0.05 s
Where is the problem?
Choose one answer
Payments, because it is the last call in the chain.
The frontend, because its span is the longest one.
Checkout is waiting for a free database connection.
Checkout's SQL query itself has become slow.