Symptom
On SAP Commerce Cloud B2B storefronts, the database CPU spikes during normal B2B order placement or cart retrieval activity via OCC APIs. The following symptoms may be observed:
- Database CPU spikes due to B2B OCC load
- HTTP 500 errors on B2B OCC endpoints if CPU saturations
- B2B users unable to place orders or retrieve carts
- The following two OCC endpoints are the primary triggers:
- POST /occ/v2/{baseSiteId}/users/{userId}/place-order
- GET /occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}
- Distributed traces show deeply nested SQL queries joining users4restriction, empl2apprsrel, pgrels, and usergroups tables with complex bound parameters
The SQL may have the following characteristic structure
| SELECT item_t1.PK FROM users4restriction item_t0 JOIN users item_t1 ON item_t0.TargetPK = item_t1.PK WHERE ... AND (item_t1.TypePkString IN (?,?,...,?) AND ((... OR (EXISTS (SELECT item_t2.PK FROM pgrels item_t2 ...) AND (... OR EXISTS (SELECT item_t3.PK FROM usergroups item_t3 WHERE ... AND (... OR (... AND EXISTS (SELECT item_t4.PK FROM usergroups item_t4 ... AND (... OR (... AND EXISTS (SELECT item_t5.PK FROM usergroups item_t5 ...)))) AND (... OR (... AND EXISTS (SELECT item_t6.PK FROM usergroups item_t6 ... AND (... OR (... AND EXISTS (SELECT item_t7.PK FROM usergroups item_t7 ...)))))))))))))) ORDER BY item_t0.PK ASC |
Read more...
Environment
SAP Commerce Cloud with B2B
Product
Keywords
B2B, performance, cart, place-order , KBA , CEC-SCC-PLA-PL , Platform , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.
SAP Knowledge Base Article - Preview