---
schema_version: "1"
id: 6b17ae7af6f2d08aab5d81e2194bf42d21209f5217a05dea87d7cf55d2b679a8
title: Timeouts and Limits
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/commerce-api/guides/timeouts-limits.md
canonical_url: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/timeouts-limits.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7885fe5a89d2ec894a75efb7960179ee0bfefd7f7e9e9edbaa9355376b34ac62
products:
  - Composable Storefront
  - Salesforce APIs
---
# Timeouts and Limits

SCAPI enforces timeout thresholds and size limits to ensure optimal performance and system stability.

## Default Timeouts

**note:** Some API families, such as SLAS and Omnichannel Inventory (OCI), do not have gateway timeouts.

| Type                                                                                                                                                    | Timeout | HTTP status code if exceeded | Customizable                                                                                                                                                                                                                                                     |
| :------------------------------------------------------------------------------------------------------------------------------------------------------ | :------ | :--------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **API Client → SCAPI Gateway**                                                                                                                          |         |                              |                                                                                                                                                                                                                                                                  |
| Connection Idle                                                                                                                                         | 400s    | -                            | No                                                                                                                                                                                                                                                               |
| [**SCAPI > Troubleshoot > (default) Timeouts**](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/timeout-troubleshoot.html) |         |                              |                                                                                                                                                                                                                                                                  |
| Shopper-API Read/Write                                                                                                                                  | 10s     | 504                          | [Yes](https://developer.salesforce.com/docs/commerce/commerce-api/references/timeouts?meta=Summary)                                                                                                                                                              |
| Custom-API Read/Write (Shopper)                                                                                                                         | 60s (10s recommended) | 504                          | Yes. For details, see [Timeouts API](https://developer.salesforce.com/docs/commerce/commerce-api/references/timeouts?meta=Summary) and [Custom API Limitations](https://developer.salesforce.com/docs/commerce/commerce-api/guide/custom-apis.html#limitations). |
| Custom-API Read/Write (Admin)                                                                                                                           | 60s     | 504                          | Yes. For details, see [Timeouts API](https://developer.salesforce.com/docs/commerce/commerce-api/references/timeouts?meta=Summary) and [Custom API Limitations](https://developer.salesforce.com/docs/commerce/commerce-api/guide/custom-apis.html#limitations). |
| Admin-API Read/Write                                                                                                                                    | 60s     | 504                          | Yes. For details, see [Timeouts API](https://developer.salesforce.com/docs/commerce/commerce-api/references/timeouts?meta=Summary).                                                                                                                              |
| **Hook Execution (per hook)**                                                                                                                           |         |                              |                                                                                                                                                                                                                                                                  |
| Shopper-API                                                                                                                                             | 10s     | 500                          | Yes                                                                                                                                                                                                                                                              |
| Admin-API                                                                                                                                               | 60s     | 500                          | Yes                                                                                                                                                                                                                                                              |

## Limits

SCAPI enforces the following request and response size constraints to ensure optimal performance and system stability.

| Type                                                                                                                                                  | Limit                                                                                                                                           | HTTP status code if exceeded | Customizable                                                                                                                                                                        |
| :---------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**SCAPI \> Troubleshoot \> Timeouts and Limits**](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/timeouts-limits.html) |                                                                                                                                                 |                              |                                                                                                                                                                                     |
| Max. request line (URL) and headers                                                                                                                   | 24kB                                                                                                                                            | 400                          | No                                                                                                                                                                                  |
| Max request payload                                                                                                                                   | 5MB                                                                                                                                             | 413                          | No                                                                                                                                                                                  |
| Max response payload                                                                                                                                  | 10MB                                                                                                                                            | 500                          | No                                                                                                                                                                                  |
| **Script API \- Quotas** (Hooks & Custom APIs)                                                                                                        |                                                                                                                                                 |                              |                                                                                                                                                                                     |
| Default limit                                                                                                                                         | [API Quotas](https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/quota/html/API_Quotas.html)                                     | 400                          | Yes. For details, see [Implement Quota Overrides](https://developer.salesforce.com/docs/commerce/commerce-solutions/guide/b2c-governance-and-quotas.html#implement-quota-overrides) |
| Storefront Limit                                                                                                                                      | [API Quotas](https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/quota/html/API_Quotas.html)                                     | 400                          | Yes. For details, see [Implement Quota Overrides](https://developer.salesforce.com/docs/commerce/commerce-solutions/guide/b2c-governance-and-quotas.html#implement-quota-overrides) |
| **Hook Circuit Breaker**                                                                                                                              |                                                                                                                                                 |                              |                                                                                                                                                                                     |
| 50 hook errors within last 100 requests                                                                                                               | [OCAPI Hook Circuit Breaker](https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-commerce-ocapi/hookcircuitbreaker.html) | 503                          | No                                                                                                                                                                                  |
