Hello!
I am trying to extend the max duration of my serverless functions in the api directory.
Currently I’m using next auth and export the GET/POST methods of it in the api/auth/[…nextauth] path I tried using the “export const maxDuration = 60;” but to no avail, so i tried configuring it via the vercel.json, but when i deploy i get the following error in my build logs :
I never used the pages structure but only used the app router.
My next version is the latest 14.2.5 and using the hobby plan (which according to the docs can extend the serverless functions to a max duration of 60s), this causes pages that need to access the backend api (via the auth flow using the GET/POST functions from next auth) to not load but instead show a “This serverless function timed out” error due to the fact that the backend need to cold start after a certain amount of time.
How can i fix this issue?