> ## Documentation Index
> Fetch the complete documentation index at: https://bunnynet-cb9733c2-add-new-partner-apis.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Limits

> Execution limits for Edge Scripts, covering CPU time, memory, subrequests, script size, and environment variables.

| Feature                          | Limit  | Description                                          |
| -------------------------------- | ------ | ---------------------------------------------------- |
| CPU Time per request             | 30s    | Maximum CPU time allocated per request.              |
| Active memory                    | 128 MB | Maximum memory available to isolate instance.        |
| Subrequests                      | 50     | Number of subrequests a script can make per request. |
| Script size                      | 10 MB  | Maximum size of the script code.                     |
| Startup time                     | 500ms  | Maximum time to startup the script.                  |
| Environment variables per Script | 128    | Maximum number of environment variables per script.  |
| Environment variable size        | 2KB    | Maximum size of environment variable value.          |

These limits cover typical use under normal operating conditions, and they keep one script from taking resources away from everyone else's.

Occasional spikes above a limit are tolerated. A script that consistently hits or exceeds one will be throttled or terminated.

## Staying within the limits

* Review your script's code so it finishes within the time and memory limits.
* Keep the number of subrequests down, and cache responses where you can.
* Watch the logs and statistics for your script so you catch a growing problem before it turns into a limit violation.

## CPU Time

CPU time is measured while the script is actually using the CPU to run your logic, and it directly affects how quickly a script can respond. It is allocated per request, so every execution gets the same share of processing time.

Infrequent spikes in CPU usage are fine. Going over the limit again and again will lead to the script being terminated.
