S
Supabase3w ago
jz

EarlyDrop in edge function

I have an edge function that sends requests to openrouter for an LLM response, but it's shutting down early with this error
[
{
"boot_time": null,
"cpu_time_used": 92,
"deployment_id": "jclqfibxdpjvcakydsgi_d1e2b2a0-1530-4028-aa7d-4c016c400c4e_57",
"event_type": "Shutdown",
"execution_id": "158c9e36-59b4-4935-a9de-b0ea06fca016",
"function_id": "d1e2b2a0-1530-4028-aa7d-4c016c400c4e",
"level": "log",
"memory_used": [
{
"external": 2909805,
"heap": 8069356,
"mem_check_captured": null,
"total": 10979161
}
],
"project_ref": "jclqfibxdpjvcakydsgi",
"reason": "EarlyDrop",
"region": "us-east-1",
"served_by": "supabase-edge-runtime-1.68.3 (compatible with Deno v1.45.2)",
"timestamp": "2025-08-07T07:48:59.614Z",
"version": "57"
}
]
[
{
"boot_time": null,
"cpu_time_used": 92,
"deployment_id": "jclqfibxdpjvcakydsgi_d1e2b2a0-1530-4028-aa7d-4c016c400c4e_57",
"event_type": "Shutdown",
"execution_id": "158c9e36-59b4-4935-a9de-b0ea06fca016",
"function_id": "d1e2b2a0-1530-4028-aa7d-4c016c400c4e",
"level": "log",
"memory_used": [
{
"external": 2909805,
"heap": 8069356,
"mem_check_captured": null,
"total": 10979161
}
],
"project_ref": "jclqfibxdpjvcakydsgi",
"reason": "EarlyDrop",
"region": "us-east-1",
"served_by": "supabase-edge-runtime-1.68.3 (compatible with Deno v1.45.2)",
"timestamp": "2025-08-07T07:48:59.614Z",
"version": "57"
}
]
9 Replies
Ad Intellegent
@jz edge functions have tight execution and memory limits optimize your request handling or move heavy tasks (like LLM API calls) to a serverless function or background job outside the edge runtime
inder
inder3w ago
Edge functions are already serverless functions
jz
jzOP3w ago
yeah thats what i was thinking, they should work :Link_Think:
inder
inder3w ago
You must be hitting edge function limits https://supabase.com/docs/guides/functions/limits
jz
jzOP3w ago
not sure which limit i could be hitting though theres basically no CPU time its getting a response within 150s maybe 400s wall time
inder
inder3w ago
Do you receive 546 status code when functions exits? If there was memory/cpu/wall-clock limit, 546 is received https://supabase.com/docs/guides/troubleshooting/edge-function-wall-clock-time-limit-reached-Nk38bW
jz
jzOP3w ago
no this is the full response:
{
"event_message": "shutdown",
"id": "1ebb1b7f-8613-41fd-9ac7-20a37e97e50b",
"metadata": [
{
"boot_time": null,
"cpu_time_used": 73,
"deployment_id": "jclqfibxdpjvcakydsgi_d1e2b2a0-1530-4028-aa7d-4c016c400c4e_63",
"event_type": "Shutdown",
"execution_id": "d388a2ca-2ba6-4bed-b5c7-333eccad7e40",
"function_id": "d1e2b2a0-1530-4028-aa7d-4c016c400c4e",
"level": "log",
"memory_used": [
{
"external": 2909480,
"heap": 7775048,
"mem_check_captured": null,
"total": 10684528
}
],
"project_ref": "jclqfibxdpjvcakydsgi",
"reason": "EarlyDrop",
"region": "us-east-1",
"served_by": "supabase-edge-runtime-1.68.3 (compatible with Deno v1.45.2)",
"timestamp": "2025-08-07T19:14:07.117Z",
"version": "63"
}
],
"timestamp": 1754594047117000
}
{
"event_message": "shutdown",
"id": "1ebb1b7f-8613-41fd-9ac7-20a37e97e50b",
"metadata": [
{
"boot_time": null,
"cpu_time_used": 73,
"deployment_id": "jclqfibxdpjvcakydsgi_d1e2b2a0-1530-4028-aa7d-4c016c400c4e_63",
"event_type": "Shutdown",
"execution_id": "d388a2ca-2ba6-4bed-b5c7-333eccad7e40",
"function_id": "d1e2b2a0-1530-4028-aa7d-4c016c400c4e",
"level": "log",
"memory_used": [
{
"external": 2909480,
"heap": 7775048,
"mem_check_captured": null,
"total": 10684528
}
],
"project_ref": "jclqfibxdpjvcakydsgi",
"reason": "EarlyDrop",
"region": "us-east-1",
"served_by": "supabase-edge-runtime-1.68.3 (compatible with Deno v1.45.2)",
"timestamp": "2025-08-07T19:14:07.117Z",
"version": "63"
}
],
"timestamp": 1754594047117000
}
inder
inder3w ago
I mean in your app. what http status code do you get in your app when function exits?
jz
jzOP3w ago
oh we dont receive a response there im just gonna switch this to railway good chance we're passing the edge wall time thank u for support ser

Did you find this page helpful?