Limits
Time, memory, bundle, request and response ceilings — and why.
The ceilings
| Limit | Default | Enforced by |
|---|---|---|
| Execution time | 10 s | PHP's own limit and a wall-clock kill in the parent — a sleeping function burns no CPU, so the wall clock is the one that always fires. |
| Memory | 128 MB | The runtime's memory limit. Exceeding it ends the invocation with a stated reason. |
| Request body | 1 MB | The gateway, before dispatch — an oversized body is 413 and is not billed. |
| Response / output | 5 MB | The parent stops reading and ends the invocation. |
| Bundle | 10 MB, 500 files | Deployment validation, before anything is written. |
| Invocation rate | 600 / minute per project | The gateway. Refusals are 429 and are not billed. |
Higher ceilings are a plan matter; the platform maximums are 60 s and 512 MB.
The isolation guarantees
Customer code is untrusted code. Each invocation runs in a dedicated process that cannot:
- read the host filesystem —
/etc/passwd,C:\Windows, the platform's.envor its source; - read another project's bundle, even given its exact path — the directory does not even list;
- spawn processes —
exec,shell_exec,system,passthru,proc_open,popen,pcntl_forkare all disabled; - reach the private network — see Outbound network below;
- discover platform secrets from its environment — they are not in the process;
- run as a privileged user, or outlive its limits.
Outbound network
Where your Flares installation has it enabled, a function can call the internet: a payment
provider, an AI API, a partner's webhook, your own services. curl and the HTTP
stream wrappers are available; HTTPS works.
What it can never reach, whatever your code asks for:
| Destination | Why it is refused |
|---|---|
127.0.0.0/8, ::1 | The host's own databases and services. |
10/8, 172.16/12, 192.168/16, fc00::/7 | The private network between Flares machines. |
169.254.0.0/16 | Link-local, including the cloud metadata service that hands out the host's own credentials. |
100.64.0.0/10, 0.0.0.0/8 | Carrier-grade NAT and this-network, reachable in some estates. |
That refusal is not made by PHP. Your function runs as its own unprivileged system user, and the host's firewall refuses that user those destinations — so it holds no matter what your code does, including code written specifically to get around it.
curl is unavailable to your
functions, that is why — ask your Flares administrator.
Outbound calls are not billed. They cost you the time they take, which counts against your function's timeout, and nothing else.
Designing within the limits
- Do long work in pieces: accept the request, record it in Basket, return quickly.
- Nothing persists on disk between invocations — write state to Basket, not to a file.
- Install dependencies at deploy time via Composer, never at request time.