Next.js Discord

Discord Forum

FUNCTION_INVOCATION_TIMEOUT on slow request in server action

Answered
Eulophid wasp posted this in #help-forum
Open in Discord
Avatar
Eulophid waspOP
Hi all... I'm making a request to Anthropic Cluade from a server function but it's hitting the timeout limit FUNCTION_INVOCATION_TIMEOUT. How can I increase the allowed process time on this?
Answered by Eulophid wasp
oh! You canfigure this in the console now... Settings > Functions 🙂
View full answer

4 Replies

Avatar
Eulophid waspOP
oh! You canfigure this in the console now... Settings > Functions 🙂
Answer
Avatar
Eulophid waspOP
Pretty sure you couldn't walwyas do that...
Avatar
oh wow, nice, didn't know that as well. programmatically you can use maxDuration https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#maxduration
Avatar
Eulophid waspOP
That's interesting @joulev - it looks like you can set the app limit max_duration in settings > Functions then override for routes using the maxDuration flag on the route. Good to know! 🙂