#Does API function timeout if it’s triggered by multiple cron jobs?
14 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in <id:customize>
✅ You can mark a message as the answer for your post with `Right click -> Apps -> Mark Solution`
(if you don't see the option, try refreshing Discord with Ctrl + R)
Hey @mental dragon your function will time out in 10 or 60 seconds, depending on your plan
Yes, but what if I call the same function multiple times, in few secs difference? Wouldn’t it try using the same warm lambda and timeout as a result?
It will (most likely, but not 100% guaranteed) use the same warm lambda container.
But it will be a brand new lambda function execution
And will have the same rules as other lambdas. 10 or 60 seconds of runtime
The only thing that may be shared between the lambdas (assuming the warm container was reused) is any variables in global scope
Yeah, need to test that out. Want to try avoid using 3rd party tools if possible for now for background jobs.
I totally understand
Vercel doesn’t make this scenario easy
You need some sort of locking mechanism
If you’re planning on processing the emails concurrently
Yeah… it’s nice they added cron jobs. But queueing system would be perfect. So I don’t need to trigger stupid amount of crons without knowing how long should I keep triggering.