Hi! Hitting a deploy issue I’d love some clarity on.
Project: cmrhpmvjmbhzlpfhqzgw
Function: generate-lesson (also generate-practice)
CLI: supabase 2.84.2, --no-verify-jwt
Crash report ID from previous attempt: dd8a0bfc6d614eb1b594c8466f8e3bd2
Symptom: deploy returns HTTP 500 "Function deploy failed due to an internal error" after all assets upload successfully. No 4xx, no parse error — just an opaque 500. ~80+ retries over ~6 hours, identical result.
Other functions in the same project deploy fine.
Empirical investigation:
- The trigger correlation is with one shared module (exercise-generators.ts) crossing ~4 MB. Below ~3.85 MB → deploys work. Above ~4 MB → 500.
- Splitting the 4 MB module into multiple files of the same total bytes does NOT help — total bundle bytes seem to be what matters, not per-file.
- Stripping ~450 KB of comments from the module brings bundle back under threshold and deploys succeed.
- Smaller sister functions in the same project deploy fine because their transitive import graph is smaller.
- A minimal entry (216 bytes) that imports the same 4 MB module DOES deploy. So the limit appears to be entry-file complexity × shared graph, not just total bytes.
Questions:
- Is there a documented (or undocumented) bundle size limit for Edge Functions? The 20 MB figure in docs doesn’t match what we observe.
- Why a 500 instead of a clear 4xx "bundle too large"? The opaque 500 cost us ~6 hours of bisecting before we figured out the real threshold.
- Any chance of raising the limit, or guidance on the real-world ceiling so we can plan around it? We’re a Czech edu app generating 200+ exercise types server-side and growing fast.
- Is dynamic import (runtime-resolved path) supported on Supabase Edge Functions? If yes that would unlock per-task-type lazy loading.
Happy to share more details / repro privately. Thanks!
Hi! Hitting a deploy issue I’d love some clarity on.
Project: cmrhpmvjmbhzlpfhqzgw
Function: generate-lesson (also generate-practice)
CLI: supabase 2.84.2, --no-verify-jwt
Crash report ID from previous attempt: dd8a0bfc6d614eb1b594c8466f8e3bd2
Symptom: deploy returns HTTP 500 "Function deploy failed due to an internal error" after all assets upload successfully. No 4xx, no parse error — just an opaque 500. ~80+ retries over ~6 hours, identical result.
Other functions in the same project deploy fine.
Empirical investigation:
Questions:
Happy to share more details / repro privately. Thanks!