Skip to content

Commit 6f759f4

Browse files
authored
docs: Add troubleshooting doc for Edge functiosn failing deploys (supabase#40077)
1 parent 0e380b8 commit 6f759f4

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title = "Edge Function deploy failed due to an internal error"
3+
topics = [ "functions" ]
4+
keywords = [ "fail", "deploy" ]
5+
6+
[[errors]]
7+
http_status_code = 500
8+
message="Function deploy failed due to an internal error"
9+
10+
[[errors]]
11+
http_status_code = 500
12+
message="unexpected deploy status 500"
13+
---
14+
15+
When encountering the `Function deploy failed due to an internal error`, try deploy the function via the [Supabase CLI](/docs/guides/local-development) with the `--debug` flag to gather extra information to identify the possible cause.
16+
17+
You can also try [alternative bundle methods](/docs/reference/cli/supabase-functions-deploy):
18+
19+
- `--use-api`: Use Management API to bundle functions.
20+
- `--use-docker`: Use Docker to bundle functions.
21+
22+
If you're not able to run the CLI or cannot identify the cause, [open a support ticket](/dashboard/support/new).
23+
24+
**Example error**
25+
26+
```
27+
$ supabase functions deploy FUNCTION_NAME --project-ref $PROJECT_ID
28+
...
29+
unexpected deploy status 500: {"message":"Function deploy failed due to an internal error"}
30+
```
31+
32+
**Example output with `--debug`**
33+
34+
- From the details we can see it is exceeding the 20MB [Edge Function size limit](/docs/guides/functions/limits)
35+
36+
```
37+
$ supabase functions deploy FUNCTION_NAME --project-ref $PROJECT_ID --debug
38+
...
39+
Deploying Function: FUNCTION_NAME (script size: 62.61MB)
40+
...
41+
unexpected update function status 413: {"message":"request entity too large"}
42+
```

0 commit comments

Comments
 (0)