When a Vercel Function runs out of memory, it exits with an error and returns a 5xx response to the caller. Vercel's anomaly detection picks this up without any configuration required. The moment a memory-related failure causes a spike in errors on a route, Vercel triggers an alert, runs an AI investigation to identify the root cause, and sends you a notification.
This guide explains how OOM failures surface in Vercel Alerts, how to monitor memory usage proactively before functions start failing, and how to use Alert Rules to route critical function errors to the right channel.
When a function hits its memory limit, the runtime terminates it and returns a 500 error. If enough requests fail in a short window, Vercel detects the 5xx spike and triggers an alert.
The AI investigation identifies the pattern and generates a plain-language title describing the root cause such as "Memory limit exceeded on /api/chat" or "5xx spike from function crashes on /api/process". You'll receive this summary in your email or Slack notification without having to dig through logs.
Alerts resolve automatically once error rates return to baseline e.g. after you roll back the deployment or increase the function's memory limit.
Vercel exposes memory metrics for your functions in the Observability dashboard. You can use these to spot functions approaching their limit before they start returning errors.
- Go to Observability Functions in your project.
- Select the route you want to inspect.
- Review the Peak memory chart (p99) alongside the provisioned memory limit.
A function consistently using 80–90% of its provisioned memory is at risk of OOM failures under traffic spikes or with larger payloads. To increase a function's memory limit, set the memory option in your vercel.json:
The default memory limit is 1024 MB. The maximum is 3009 MB on Pro and Enterprise plans.
By default, Vercel sends all alert notifications by email. To make sure memory-related failures reach the right people immediately, you can create an Alert Rule that routes critical alerts to a dedicated Slack channel or webhook.
See Filter to critical alerts only to learn how to set up Alert Rules.
- View function memory metrics in Observability → Functions.
- Configure memory limits for individual functions in
vercel.json. - Set up Alert Rules to route critical alerts to Slack or a webhook.