Files
supabase/apps/docs/content/guides/functions/limits.mdx
T
claude[bot]andClaude c1bd941598 docs: clarify edge function deployment size limits (5MB server-side vs 20MB local) (#47941)
<!-- ccr-slack-attribution -->
_Requested by **Lakshan Perera** · [Slack
thread](https://supabase.slack.com/archives/C023E4L60R3/p1784055775538959?thread_ts=1784055775.538959&cid=C023E4L60R3)_

## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Docs update.

## What is the current behavior?

Both the "Edge Function bundle size issues" troubleshooting page and the
Edge Functions "Limits" page stated only a single **20 MB** limit. In
practice, that 20 MB figure applies only to **local bundling** with the
Supabase CLI. When a function is deployed via the **Management API or
Dashboard**, bundling runs server-side and is capped at **5 MB** due to
an infrastructure (Lambda) limit. Customers deploying that way were
surprised to hit an error like `Function source code exceeds the maximum
deployment size (5 MB). Reduce the size of your function and try again.`
even though the docs implied 20 MB was available.

## What is the new behavior?

Both pages now state the distinction explicitly:

- **Local bundling (Supabase CLI):** up to **20 MB**.
- **Server-side bundling (Management API or Dashboard):** up to **5
MB**.

The troubleshooting page also adds a "Deploying larger functions"
section pointing customers at the workaround: if a function is under 20
MB but over the 5 MB server-side limit, bundle it locally by running
`supabase functions deploy` with the `--use-docker` flag to force local
bundling and get the higher limit.

## Additional context

**How / files changed:**

-
`apps/docs/content/troubleshooting/edge-function-bundle-size-issues.mdx`
— rewrote the intro to describe both limits, added the "Deploying larger
functions" workaround section, and fixed the frontmatter `keywords`
(replaced `"10MB"` with `"5MB"` and `"20MB"`).
- `apps/docs/content/guides/functions/limits.mdx` — updated the "Maximum
Function Size" line to list both the 20 MB local and 5 MB server-side
limits.

Before, both pages said only 20 MB, so customers deploying via the
API/Dashboard were surprised by a 5 MB error; after, both pages state
the 5 MB server-side vs 20 MB local distinction and point to local
bundling as the workaround.

---
_Generated by [Claude
Code](https://claude.ai/code/session_019bBXmQTRBWJbo3UTpfjPLU)_

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-15 06:54:19 -06:00

44 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
id: 'functions-limits'
title: '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):
This is the duration an Edge Function worker will stay active. During this period, a worker can serve multiple requests or process background tasks.
- Free plan: 150s
- Paid plans: 400s
- Maximum CPU Time: 2s (Amount of actual time spent on the CPU per request - 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: 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: 500
- Team: 1000
- Enterprise: Unlimited
- Maximum log message length: 10,000 characters
- Log event threshold: 100 events per 10 seconds
- Recursive/Nested Function Calling: ~5000 requests per minute [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).
## 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).