Files
supabase/apps/docs/content/troubleshooting/edge-function-546-error-response.mdx
T
Charis bb7d4cf8de fix(docs): add missing db ids to troubleshooting articles (#42742)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Updated troubleshooting resources with significantly expanded guides
covering authentication, database management, edge functions, storage
operations, deployment scenarios, and system configuration. Enhanced
documentation includes detailed remediation procedures, alternative
solutions for common issues, and comprehensive step-by-step instructions
to help users resolve configuration and operational challenges.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-17 10:29:19 +01:00

58 lines
1.8 KiB
Plaintext

---
title = "Edge Function 546 error response"
topics = [ "functions" ]
keywords = [ "546", "error", "resource", "memory", "cpu", "event loop", "edge function" ]
database_id = "4e6ff2e4-2abb-4fba-8233-5883b3d56fb0"
[[errors]]
http_status_code = 546
message = "Edge Function error"
---
The 546 error typically indicates resource exhaustion or code issues in your Edge Function.
## Common causes
### Memory or CPU limits
Your function may have exceeded available resources. Check the resource usage metrics in your dashboard at Functions > [Your Function] > Metrics.
### Event loop completion
If logs show "Event loop completed," your function has implementation issues. Check your function code for:
- Syntax errors
- Infinite loops
- Unresolved promises
## Debugging steps
### Run the function locally
Use the Supabase CLI to run your function locally and get detailed stack traces:
```bash
supabase functions serve your-function --debug
```
The local console provides full stack traces with line numbers, making it easier to identify the source of errors.
### Check function logs
Navigate to Functions > [Your Function] > Logs in the dashboard. Look for:
- Error messages
- Resource usage warnings
- Shutdown events with specific reasons
### Review example implementations
Compare your function against working examples in the [Edge Functions examples repository](https://github.com/supabase/supabase/tree/master/examples/edge-functions).
## Additional resources
- [Edge Function shutdown reasons explained](./edge-function-shutdown-reasons-explained)
- [Edge Function wall clock time limit reached](./edge-function-wall-clock-time-limit-reached-Nk38bW)
- [Monitoring resource usage](./edge-function-monitoring-resource-usage)
- [Debugging Edge Functions](/docs/guides/functions/logging)