#Increase max duration

13 messages · Page 1 of 1 (latest)

heavy merlin
#

Hey, I am facing with 504 timeouts and I want to increase the max duration of my script, but I don't know where exactly to update it.

I've attached few images for a better understanding of the problem. I truly can't identify where should I implement the maxDuration constant.

tiny trenchBOT
#

🔎 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)

oblique bough
#

Whats timing out? Are you hitting a route handler? a server action? What is it your doing?

heavy merlin
#

@oblique bough I managed to fix it by increasing the maxDuration timeout to my server components:

app/page.tsx
app/[locale]/page.tsx
app/[locale]/layout.tsx

also with the following vercel.json

{
  "functions": {
    "app/api/**/*": {
      "maxDuration": 90
    }
  }
}
oblique bough
#

Thatll do it! 🙂

tiny trenchBOT
#
✅ Success!

This question has been marked as answered! If you have any other questions, feel free to create another post

Jump to answer

[Click here](#1234901291004727356 message)

heavy merlin
#

@oblique bough can you help me with a question? I do have here the Pro plan, and would I be charged more if I upgrade the function CPU for my project?

oblique bough
#

I dont honestly know. I self host everything.

heavy merlin
#

oof

oblique bough
#

Never deployed to vercel

heavy merlin
#

you're a brave person

oblique bough
#

eh, I work in an enterprise environment I have people backing my infrastructure so I dont have to worry about the resources. I need more Storage/Ram/CPU power, I tell them I need it and they give it lol

#

for the most part