You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a copy of a troubleshooting article on Supabase's docs site. It may be missing some details from the original. View the original article.
Learn how Edge Functions manage CPU resources and what happens when limits are reached.
How isolates work
An isolate is like a worker that can handle multiple requests for a function. It works until a time limit of 400 seconds is reached. Edge Functions use isolates with soft and hard CPU limits.
Soft limit
When the isolate hits the soft limit, it retires. This means:
It won't take on any new requests
It will finish processing requests it's already working on
It keeps going until it hits the hard limit for CPU time or reaches the 400-second time limit, whichever comes first
Hard limit
If there are new requests after the soft limit is reached:
A new isolate is created to handle them
The original isolate continues until it hits the hard limit or the time limit
This ensures existing requests are completed while new ones are managed by a fresh isolate
Current limits
Wall clock time limit: 400 seconds total duration
CPU execution time: 200 milliseconds of active computing
What happens when limits are exceeded
When your function exceeds CPU limits, you may see:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
This is a copy of a troubleshooting article on Supabase's docs site. It may be missing some details from the original. View the original article.
Learn how Edge Functions manage CPU resources and what happens when limits are reached.
How isolates work
An isolate is like a worker that can handle multiple requests for a function. It works until a time limit of 400 seconds is reached. Edge Functions use isolates with soft and hard CPU limits.
Soft limit
When the isolate hits the soft limit, it retires. This means:
Hard limit
If there are new requests after the soft limit is reached:
Current limits
What happens when limits are exceeded
When your function exceeds CPU limits, you may see:
CPUTimeshutdown reasonOptimizing CPU usage
Profile your code
Identify CPU-intensive sections in your function:
Optimize algorithms
Offload heavy work
Additional resources
Beta Was this translation helpful? Give feedback.
All reactions