Next.js Discord

Discord Forum

why Pro Plan's maxDuration is not 300s by default?

Unanswered
Chinese perch posted this in #help-forum
Open in Discord
Chinese perchOP
hi. title says all.
in order to increase max duration about Route Hander or Server Actions, we need to add export const maxDuration = 300.
but, why maxDuration = 300 is not default for Vercel Pro plan ?
Is there any hidden intention of this policy ?

thank you

11 Replies

they changed it to 15 seconds by default at the end of last year I believe
I can guess why, a lower run time by default means vercel saves some money
but thats just my guess
if you really want to get the details behind their reasoning then either contact vercel support or post on their github discussions page
no-one here can speak on behalf of vercel
Chinese perchOP
@linesofcode yeah, you are right. thank you for answer 🙂
I would say vercel doesn’t want you to incur a huge bill in case you have a bug. An infinite loop in your code + 6 min timeout will not make your credit card happy.
In the pro plan everything is measured so they probably don’t want you to accidentally burn your bank account
You can always reconfigure the timeout, which is a way to tell them “I guarantee this code won’t have an infinite loop and if I f*ck up I take all responsibilities”
Chinese perchOP
@joulev interesting, it also make sense. how did you catch this credit card issue. haha
@Chinese perch <@484037068239142956> interesting, it also make sense. how did you catch this `credit card issue`. haha
I’ve seen many people having accidental bugs that blow all those numbers up, and then going to twitter begging vercel to refund/unlock accounts that were charged/locked due to those bugs. Vercel almost always refunds, so whenever such bugs happen they lose money (and you have a heart attack). They want to ensure they don’t lose money and their customer doesn’t have to go beg them for refunds