mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## Problem Edge Function CPU limits in docs are described as applying per request but this doesn't hold true for how functions have worked. ## Solution Update CPU limits to be described as per worker. <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | Docs | [/docs/guides/functions/limits](https://supabase.com/docs/guides/functions/limits) | [/docs/guides/functions/limits](https://correct-edge-functions-limits-supabase.vercel.app/docs/guides/your-page) | Amount of actual time spent on the CPU per worker | --> ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
45 lines
2.4 KiB
Plaintext
45 lines
2.4 KiB
Plaintext
---
|
||
id: 'functions-limits'
|
||
title: 'Edge Functions limits'
|
||
description: "Limits applied Edge Functions in Supabase's hosted platform."
|
||
subtitle: "Limits applied Edge Functions in Supabase's hosted platform."
|
||
---
|
||
|
||
## Runtime limits
|
||
|
||
- Maximum Memory: 256MB
|
||
- [Maximum Duration (Wall clock limit)](/kb/troubleshooting/edge-function-limits):
|
||
This is the duration an Edge Function worker will stay active. During this period, a worker can serve multiple requests or process [background tasks](/docs/guides/functions/background-tasks).
|
||
- Free plan: 150s
|
||
- Paid plans: 400s
|
||
- [Maximum CPU Time](/kb/troubleshooting/edge-function-limits): 2s (Amount of actual time spent on the CPU per worker - does not include async I/O.)
|
||
- Request idle timeout: 150s (If an Edge Function doesn't send a response before the timeout, 504 Gateway Timeout will be returned)
|
||
|
||
## Platform limits
|
||
|
||
- [Maximum Function Size](/kb/troubleshooting/edge-function-bundle-size-issues): 20MB (bundled locally via the CLI) or 5MB (bundled server-side, e.g. via the Management API or Dashboard)
|
||
- Maximum no. of Functions per project:
|
||
- Free: 100
|
||
- Pro: 1000
|
||
- Team: 2000
|
||
- Enterprise: Unlimited
|
||
- Maximum log message length: 10,000 characters
|
||
- Log event threshold: 100 events per 10 seconds
|
||
- Recursive/Nested Function Calling: 30 requests per trace, within a 60-second window [more details](/docs/guides/functions/recursive-functions)
|
||
|
||
### Secrets
|
||
|
||
- Maximum number of secrets per project: **100**
|
||
- Secret name length: up to **256** characters
|
||
- Maximum secret size: **48 KiB** (**24,576** characters)
|
||
- Names must NOT start with the prefix `SUPABASE_` (this prefix is reserved).
|
||
- Need more than 100 secrets? [Bundle secrets into a JSON value](/kb/troubleshooting/working-around-the-edge-function-secrets-limit).
|
||
|
||
## Other limits & restrictions
|
||
|
||
- Outgoing connections to ports `25` and `587` are not allowed.
|
||
- Serving of HTML content is only supported with [custom domains](/docs/reference/cli/supabase-domains) (Otherwise `GET` requests that return `text/html` will be rewritten to `text/plain`).
|
||
- Web Worker API (or Node `vm` API) are not available.
|
||
- Static files cannot be deployed using the API flag. You need to build them with [Docker on the CLI](/docs/guides/functions/quickstart#step-6-deploy-to-production).
|
||
- Node Libraries that require multithreading are not supported. Examples: [`libvips`](https://github.com/libvips/libvips), [sharp](https://github.com/lovell/sharp).
|