What should I do if I receive a 429 error on Vercel?

Learn about when Serverless Functions return a 429 status code and what can be done about them.
Last updated on March 21, 2024
Functions

A 429: FUNCTION_RATE_LIMIT error on your Vercel Serverless Function indicates that the default limit of concurrent executions has been reached (30,000 for Pro and 100,000 for Enterprise). Although rare, this guide discusses potential causes and steps to resolve or mitigate this issue.

Concurrency refers to the ability of your Serverless Function to handle multiple executions simultaneously.

Exceeding the concurrency limit may indicate a deeper issue. If the serverless execution time per request is increasing, it suggests that the available function capacity is being utilized fully. It's advisable to check your upstream provider (API, Content Management System, Database, etc.) to ensure it scales alongside Vercel, as increasing concurrency may strain your upstream provider further.

Vercel automatically scales the number of function instances based on demand, up to a maximum of 30,000 concurrent executions for Pro and 100,000 for Enterprise with the option for extended concurrency.

This ensures optimal performance during traffic surges without requiring manual intervention. Learn more about automatic concurrency scaling for Vercel Functions.

Burst concurrency allows for a temporary increase in the concurrency limit to handle sudden traffic influxes. After the initial burst, Vercel continues to scale your function by a maximum of 500 concurrency per minute.

The scaling process might take several minutes, especially during substantial traffic increases, to ensure a smooth scaling experience that aligns with natural traffic patterns and minimizes impact on performance.

Learn more about burst concurrency on Vercel.

If your response can be cached, even for a short duration, adding appropriate cache-control headers can help reduce the number of requests reaching your function, while also improving response times.

Learn more about caching on Vercel.

Utilize Incremental Static Regeneration (ISR) to generate static pages on-demand, which can help manage high-traffic events effectively.

You can limit the maximum duration for your functions to ensure they do not run longer than necessary, which can also help in managing resources better.

Couldn't find the guide you need?