Functions limits
Review the limits for functions and function instances on an application: the ceilings that bound one invocation, and the usage included with each plan.
Functions applies default limits to the function code, to the arguments a function instance carries, and to each invocation. The values on this page cover functions and function instances on an application. Two kinds of limit apply: the ceilings that bound a single invocation or a single object, and the usage included with each service plan every month.
Default limits
Every value in this table applies by default to a function, to a function instance on an application, or to the account that holds them. To request a higher limit for your plan, contact the technical support team.
| Scope | Limit | Description |
|---|---|---|
| Arguments | 100 KB | Maximum size of the JSON Args object passed to a function instance. Exceeding it causes the function to fail at instantiation. |
| Memory per isolate | 512 MB | Maximum memory for a single execution context (V8 isolate), including heap, stack, and all runtime allocations. |
| Code limit (Console) | 6 MB | Maximum size of the function source code when created or edited in Azion Console. |
| Code limit (API) | 20 MB | Maximum size of the function source code when deployed through the Azion API. |
| Environment variable size | 32 KB | Maximum total size of all environment variables for a single function. |
| Environment variables per account | 100 | Maximum number of environment variables an account holds. |
| Sub-requests | 50 | Maximum number of outbound fetch() calls in a single invocation. |
| Max CPU execution time | 2 s | Maximum CPU time per invocation. Measures active computation, not wall-clock time. A function that exceeds it is terminated. |
| Max execution time | 5 min | Maximum wall-clock time for an invocation, including I/O wait, fetch() calls, and async operations. |
| URL size | 16 KB | Maximum size of the request URL a function can process, path and query string included. |
| Header size | 64 KB | Maximum total size of all HTTP request headers a function can read or write. |
| Body size | 100 MB (Hobby), 200 MB (Pro), 500 MB (Enterprise) | Maximum size of the HTTP request or response body a function can process. |
Included usage per plan
The ceilings above bound one invocation or one object, and they do not change with the plan. The amounts below bound a month, and they do.
| Metric | Hobby | Pro | Enterprise |
|---|---|---|---|
| Compute Time | 8 hours / month | 10 hours / month | Custom |
| Requests | 3M / month | 10M / month | Custom |
Compute Time is the total execution a function accumulates across every invocation in the month. It is a different measurement from the per-invocation ceilings above: a single invocation is still bounded by 2 s of CPU time and 5 minutes of wall-clock time, however much of the monthly total remains.
What happens past the included amount depends on the plan. On Hobby, exceeding the included usage may require an upgrade, and the account may be restricted. On Pro and Enterprise, the additional consumption is billed at on-demand rates, and configurable spend limits control how far that goes. Pricing carries the on-demand rates.
For the per-unit rate of compute time and of invocations, refer to Functions. To read how much of each amount the account has consumed so far, refer to Query usage data from Functions.
Limits for functions on a firewall
A function that runs on a firewall has the limits above. The bounds that belong to the firewall and to its function instances, such as the size of the arguments payload and the length of an instance name, are on Firewall limits.