setTimeout for 30s, not working on vercel , but works locally
Unanswered
Keyhole wasp posted this in #help-forum
Keyhole waspOP
I have a setTimeout , on my serverless api for 30 mins.
When I run it locally , it works, but when I run it hosted on vercel, this function doesn't runs. Even It doesn't gives any error.
I tried to do it - by setting the timeout for 2 mins, and it worked, but why not for 30 mins ???
When I run it locally , it works, but when I run it hosted on vercel, this function doesn't runs. Even It doesn't gives any error.
I tried to do it - by setting the timeout for 2 mins, and it worked, but why not for 30 mins ???
4 Replies
Keyhole waspOP
hey anyone know this
Thrianta
i think the maximum duration of a serverless function is like 5min on the free tier. check vercel's limits page
Keyhole waspOP
but @Thrianta its not giving any error , I know about this.
It also gives an error - maxDuration error, which I am not able to get
It also gives an error - maxDuration error, which I am not able to get
Thrianta
Hmm, so youve checked the deployment’s logs and theres no errors. Im not sure then. Increase your timeout value until it stops working in prod. Maybe you can deduce something.