fix(functions): set nofile ulimit for Edge Runtime container#5152
Merged
avallete merged 4 commits intosupabase:developfrom Apr 30, 2026
Merged
fix(functions): set nofile ulimit for Edge Runtime container#5152avallete merged 4 commits intosupabase:developfrom
avallete merged 4 commits intosupabase:developfrom
Conversation
The Edge Runtime container was started with Docker's default nofile ulimit (1024 soft), causing "Too many open files" errors for projects with 200+ Edge Functions running long dev sessions. Set nofile ulimit to 65536 (soft and hard) to allow sufficient file descriptors for Deno isolates handling many concurrent functions. Fixes supabase#5151 Signed-off-by: wucm667 <stevenwucongmin@gmail.com>
Member
|
Hey there ! Thank you for your contribution ! |
avallete
approved these changes
Apr 30, 2026
Coverage Report for CI Build 25156940952Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage increased (+0.004%) to 63.757%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions5 previously-covered lines in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5151
What type of PR is this?
What this PR does / why it is needed:
The Edge Runtime container was started with Docker's default
nofileulimit (1024 soft limit). For projects with many Edge Functions (200+) and long-running local dev sessions, the per-isolate file descriptor usage accumulates until new isolates fail to boot with:This PR sets the
nofileulimit to 65536 (both soft and hard) for the Edge Runtime container, allowing sufficient file descriptors for Deno isolates handling many concurrent functions.Changes:
Resources.Ulimitsto thecontainer.HostConfiginServeFunctions, settingnofileto 65536Reproduction:
supabase start