Why am I getting the 'Wall clock duration reached' Warning? #17603
-
A couple of days ago, I started getting this warning with all of my edge function invocations. The function will execute correctly, and 5 minutes later I get this warning with a log of the CPU time used, which on average for all of my functions is less than 50ms. This warning even comes when I deploy a new Hello World function. I'll note that I'm currently using the free tier. Also, around the time I started to get these warnings, I clicked to agree to the new organization based billing, but this detail might be a red herring : ) I've tried creating edge functions within new projects and even a new organization, and they all give me this warning. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
@alexbriannaughton Do you still receive the 'Wall clock duration reached'? We previously had an incorrect behavior where the warning was emitted when it shouldn't. We've deployed a fix for it. |
Beta Was this translation helpful? Give feedback.
-
@laktek I do not--thanks for checking in! I noticed the warning has now been replaced by a new INFO log which says 'isolate shutdown'. It is also triggered by a WallClockTimeLimit event, about five minutes after all of my edge function executions. Is this the intended behavior? |
Beta Was this translation helpful? Give feedback.
-
New Supabase user here. I still see import { corsHeaders } from "../_shared/cors.ts"
const RESEND_API_KEY = Deno.env.get("RESEND_API_KEY")
Deno.serve(async (req) => {
// This is needed if you're planning to invoke your function from a browser.
if (req.method === "OPTIONS") {
return new Response("ok", { headers: corsHeaders })
}
try {
const { from, to, subject, html } = await req.json()
const res = await fetch("https://api.resend.com/emails", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${RESEND_API_KEY}`,
},
body: JSON.stringify({
from,
to,
subject,
html,
}),
})
const data = await res.json()
return new Response(JSON.stringify(data), {
headers: { ...corsHeaders, "Content-Type": "application/json" }, // Be sure to add CORS headers here too
status: 200,
})
} catch (error) {
return new Response(JSON.stringify({ error: error.message }), {
headers: { ...corsHeaders, "Content-Type": "application/json" }, // and here
status: 400,
})
}
}) |
Beta Was this translation helpful? Give feedback.
-
This is still happening for me |
Beta Was this translation helpful? Give feedback.
@alexbriannaughton Do you still receive the 'Wall clock duration reached'? We previously had an incorrect behavior where the warning was emitted when it shouldn't. We've deployed a fix for it.