mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
Part of DOCS-1619 ## Problem Five lookup pages predate the reference template from #54454. They're missing descriptions, mix context into the lookup, or list every entry in the right-hand table of contents. ## Solution - Restructure the five pages onto the reference template, with facts unchanged. - Add or rewrite each description, and put titles in sentence case. - Turn the Edge Functions limits lists into tables, and move the 9 status codes to H4s under three categories. ## Preview links | Page | Live | Preview | | --- | --- | --- | | Analytics bucket limits | [Live](https://supabase.com/docs/guides/storage/analytics/limits) | [Preview](https://docs-git-docs-reference-rework-supabase.vercel.app/docs/guides/storage/analytics/limits) | | Vector bucket limits | [Live](https://supabase.com/docs/guides/storage/vector/limits) | [Preview](https://docs-git-docs-reference-rework-supabase.vercel.app/docs/guides/storage/vector/limits) | | Realtime limits | [Live](https://supabase.com/docs/guides/realtime/limits) | [Preview](https://docs-git-docs-reference-rework-supabase.vercel.app/docs/guides/realtime/limits) | | Edge Functions limits | [Live](https://supabase.com/docs/guides/functions/limits) | [Preview](https://docs-git-docs-reference-rework-supabase.vercel.app/docs/guides/functions/limits) | | Edge Functions status codes | [Live](https://supabase.com/docs/guides/functions/status-codes) | [Preview](https://docs-git-docs-reference-rework-supabase.vercel.app/docs/guides/functions/status-codes) | ## Review category (docs PRs only) <!-- If this PR changes docs and you're on the Supabase team, select one category. PRs from forks are always reviewed as Low, so you can skip this section. --> - [ ] Critical: needs a review as soon as possible - [ ] Urgent: the feature ships soon, or it's blocking something else - [ ] Moderate: good to have soon, not urgent - [ ] Low: get to it when you can ## Review instructions 1. Open each preview next to its live page. The limits and codes match. 2. Open the status codes preview. **On this page** lists the three categories, not each code. ## Checklist Check all before review: - [ ] 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)
64 lines
5.9 KiB
Plaintext
64 lines
5.9 KiB
Plaintext
---
|
|
id: 'functions-limits'
|
|
title: 'Edge Functions limits'
|
|
description: 'Look up the limits on Supabase Edge Functions, including memory, wall clock duration, CPU time, function size, functions per project, logs, and secrets.'
|
|
---
|
|
|
|
Look up the limits and restrictions that apply to Edge Functions on Supabase's hosted platform. Check this page when any of the following happens:
|
|
|
|
- A function returns `546` because it exceeded a resource limit (`WORKER_RESOURCE_LIMIT`)
|
|
- A function returns `504 Gateway Timeout` because it didn't respond within the request idle timeout
|
|
- A function or its [background task](/docs/guides/functions/background-tasks) shuts down when it reaches the wall clock, CPU, or memory limit
|
|
|
|
## Runtime limits
|
|
|
|
The following table lists the limits on each Edge Function worker and request.
|
|
|
|
| Limit | Value | Details |
|
|
| ------------------------------------------------------------------------------- | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
| Maximum memory | 256MB | |
|
|
| [Maximum duration (wall clock limit)](/kb/troubleshooting/edge-function-limits) | Free Plan: 150s, Pro Plan and above: 400s | The duration an Edge Function worker stays active. During this period, a worker can serve multiple requests or process [background tasks](/docs/guides/functions/background-tasks). |
|
|
| [Maximum CPU time](/kb/troubleshooting/edge-function-limits) | 2s | The amount of actual time spent on the CPU per worker. Doesn't include async I/O. |
|
|
| Request idle timeout | 150s | If an Edge Function doesn't send a response before the timeout, it returns 504 Gateway Timeout. |
|
|
|
|
## Platform limits
|
|
|
|
The following table lists the limits on functions and logs in each project.
|
|
|
|
| Limit | Value |
|
|
| -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
| [Maximum function size](/kb/troubleshooting/edge-function-bundle-size-issues) | 20MB bundled locally with the CLI, or 5MB bundled server-side, such as with the Management API or Dashboard |
|
|
| Maximum number 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 or nested function calls](/docs/guides/functions/recursive-functions) | 30 requests per trace, within a 60-second window |
|
|
|
|
### Secrets
|
|
|
|
The following table lists the limits on secrets in each project.
|
|
|
|
| Limit | Value |
|
|
| ------------------------------------- | --------------------------------------------------- |
|
|
| Maximum number of secrets per project | **100** |
|
|
| Secret name length | Up to **256** characters |
|
|
| Maximum secret size | **48 KiB** (**24,576** characters) |
|
|
| Reserved name prefix | `SUPABASE_`. Names must not start with this prefix. |
|
|
|
|
## Other limits & restrictions
|
|
|
|
The following restrictions apply to all Edge Functions:
|
|
|
|
- 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).
|
|
|
|
## Related resources
|
|
|
|
To work within these limits, see the following pages:
|
|
|
|
- [Edge Functions status codes](/docs/guides/functions/status-codes): what a `504` or `546` response means, and how to fix it.
|
|
- [Background tasks](/docs/guides/functions/background-tasks): mark background tasks, and how the wall clock, CPU, and memory limits cap them.
|
|
- [Working around the secrets limit](/kb/troubleshooting/working-around-the-edge-function-secrets-limit): bundle secrets into a JSON value when you need more than 100.
|