How to increase server actions max duration?
Answered
Broad-snouted Caiman posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Broad-snouted CaimanOP
I created vercel.json time and passed this data
{
"functions": {
"app/components/**/*": {
"maxDuration": 240
}
}
}
but functions still output 504 after 15 secAnswered by Ray
https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#maxduration
you should use this with app router
you should use this with app router
5 Replies
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#maxduration
you should use this with app router
you should use this with app router
Answer
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Broad-snouted CaimanOP
Thanks!
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
np please mark solution if it works for you
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Broad-snouted CaimanOP
How do I mark your answer as solution?
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
right click the answer > application > mark solution