Next.js Discord

Discord Forum

This Serverless Function has timed out in Next app

Unanswered
Black Caiman posted this in #help-forum
Open in Discord
Black CaimanOP
I'm using getServerSideProps' to get a parameter in the URL, no big deal, but when I upload my application to Vercel (Hobby plan) I have the following problem:

export const getServerSideProps: GetServerSideProps = async ({ query }) => { return { props: { nickName: query.nickName } }; };

This Serverless Function has timed out. Your connection is working correctly. Vercel is working correctly.

504: GATEWAY_TIMEOUT Code: FUNCTION_INVOCATION_TIMEOUT ID: > gru1::5g5x4-1687230420091-471e7398e9e4

If you are a visitor, contact the website owner or try again later. If you are the owner, learn how to fix the error and check the logs.

I tested the Pro plan, and when using vercel.json the problem is "solved"

{ "framework": "nextjs", "functions": { "src/pages/[nickName]": { "memory": 3008, "maxDuration": 20 } } }

what's the best way to go and why all this processing?

0 Replies