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.
Edge Functions have a 60-second execution limit. If your function is taking too long to respond, follow these steps to diagnose and optimize performance.
Diagnose the issue
Check function logs: Navigate to Functions > [Your Function] > Logs in the dashboard
Examine boot times: Look for booted events and check for consistent boot times
Identify bottlenecks: Review your code for slow operations
Analyze boot time patterns
If boot times are consistently slow: The issue is likely in your function's code, such as a large dependency, a slow API call, or a complex computation. Focus on optimizing your code, reducing dependency size, or implementing caching.
If only some boot events are slow: Find the affected region in the metadata and submit a support request via the "Help" button at the top of the dashboard.
Optimize database queries
Inefficient database queries are a common cause of slow responses:
// Good: Only select needed columns and limit resultsconst{ data }=awaitsupabase.from('users').select('id, name').limit(10)// Avoid: Fetching all columns from large tablesconst{ data }=awaitsupabase.from('users').select('*')
Common causes of slow functions
Large dependencies: Heavy packages increase boot time
Slow external API calls: Third-party services with high latency
Complex computations: CPU-intensive operations
Unoptimized database queries: Fetching more data than needed
Cold starts: First invocation after idle period takes longer
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.
Edge Functions have a 60-second execution limit. If your function is taking too long to respond, follow these steps to diagnose and optimize performance.
Diagnose the issue
bootedevents and check for consistent boot timesAnalyze boot time patterns
If boot times are consistently slow: The issue is likely in your function's code, such as a large dependency, a slow API call, or a complex computation. Focus on optimizing your code, reducing dependency size, or implementing caching.
If only some boot events are slow: Find the affected
regionin the metadata and submit a support request via the "Help" button at the top of the dashboard.Optimize database queries
Inefficient database queries are a common cause of slow responses:
Common causes of slow functions
Additional resources
All reactions