Replies: 1 comment
-
@henningko There is no way to speed up the response on first invocation — all Serverless Functions execute equally. Have you tried using a different region to see if it would finish executing in a shorter period of time? → |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Cheers,
I am deploying a Nuxt3 app and using Nuxt's API. I have an endpoint that parses URLs and extracts texts using mozilla/readability, and then saves it in supabase:
/api/add.ts
Full codebase: https://github.com/henningko/briefxyz
This works great as long as the function is "warm"—the request runs in well under 2sec. However, during first invocation, the request routinely times out with
504 FUNCTION_INVOCATION_TIMEOUT
.I'm in the free tier, which puts the timeout at 5sec, but this seems to be a question of a slow boot rather than a slow script (albeit, there's probably room for improvement).
Is there any way to speed up the response on first invocation?
Beta Was this translation helpful? Give feedback.
All reactions