Vercel Serverless Function has timed out error

Viewed 5870

I have a Nuxt.js server side website deployed on Vercel. I've noticed that, on some occasions, I get a 504: GATEWAY_TIMEOUT error, with the code FUNCTION_INVOCATION_TIMEOUT and the message "This Serverless Function has timed out".

Why am I seeing this error?

Serverless function has timed out

3 Answers

Vercel imposes some limits when using their platform. This includes a serverless function execution timeout, which is basically the amount of time that a serverless function is allowed to process an HTTP request before it must respond.

Recently, they have silently reduced the serverless function execution timeout from 10s for the hobby plan, 60s for the pro plan and 1000s for the enterprise plan to, respectively, 5s, 15s and 30s. This might be the reason why you're experiencing this error now.

I really didn't like the fact that they lowered these limits without warning their users (I wasn't warned, at least) and giving them time to adjust.

As of 7 September 2022, the Hobby plan on Vercel supports Serverless Function Execution Timeout for 10 seconds. Pro for 60 seconds. Enterprise for 900 seconds. enter image description here

Here is a link to their pricing plans: https://vercel.com/pricing

Application Error

The request for a Serverless Function reached the timeout threshold (5 seconds for Hobby accounts, 15 seconds for Pro accounts, and 30 seconds for Enterprise accounts). This is an application error.

Getting worse ...

Related