# Rate Limits
<subtitle>Understand platform API and sandbox operation access thresholds to ensure your application runs smoothly.</subtitle>

To ensure service stability and fair sharing, the UCloud Sandbox platform has set rate limits for various types of API calls and resource usage.

## Resource Specifications and Quotas

The following table lists the detailed resource limits for the current platform:

| Category | Limit Item | Threshold / Description |
| :--- | :--- | :--- |
| **Compute Resources** | CPU/Memory Ratio | Supports 1:1, 1:2, 1:4 |
| | CPU Limit | 8 Core |
| | Memory Limit | 8 GB |
| **Storage and Network** | Single User Storage Limit | 10 GB |
| | Public Network Bandwidth | 5 MB/s |
| | Disk I/O | 20 MB/s |
| **Sandbox Limits** | Concurrent Running Count | 20 |
| | Custom Template Count | 5 |
| | Paused Sandbox Count | 5 (retention period 1 month) |
| | Maximum Single Run Duration | 24 hours |
| | Monthly Runtime Limit | 864,000 seconds (10 days) |
| **API** | API Call Rate Limit | Unlimited |

---

## Behavior When Limits Are Reached

When your calls exceed the set thresholds, the platform will take the following protective measures:

*   **HTTP Protocol**: When directly calling REST API or sandbox ports, it will return `429 Too Many Requests`, indicating that the quota limit has been reached.
*   **Python SDK**: Method calls will throw a `RateLimitException` exception.

>
> If you encounter rate limiting issues, please contact our team for quota adjustment support.

## Best Practices

>
> **How to Handle Limits?**
1.  **Exponential Backoff**: When catching `RateLimitException`, it is recommended to use an exponential backoff algorithm to retry.
2.  **Timely Cleanup**: Be sure to explicitly call `.kill()` on sandboxes that are no longer in use to release concurrent quotas.
3.  **Batch Operations**: Try to combine file read/write or related command executions to reduce frequent API round-trips in a short time.