mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 03:15:06 +03:00
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Docs update (stale internal links / dead anchors). ## What is the current behavior? The Metrics guide moved from `/docs/guides/platform/metrics` to `/docs/guides/telemetry/metrics` and was split into sub-pages, but 15 internal links across the docs still use the old path: 1. **Redirect chain** — non-anchored links to `/docs/guides/platform/metrics` only resolve via a two-hop permanent redirect (`platform/metrics` → `monitoring-troubleshooting/metrics` → `telemetry/metrics`, in `apps/www/lib/redirects.js`). 2. **Dead anchors** — `#accessing-the-metrics-endpoint` and `#deploying-supabase-grafana` no longer exist on the restructured page, so those links currently land at the top of the page instead of the intended section. ## What is the new behavior? - Non-anchored links now point directly at the canonical `/docs/guides/telemetry/metrics` (relative links use `../telemetry/metrics`), avoiding the redirect chain. - `#accessing-the-metrics-endpoint` links → `/docs/guides/telemetry/metrics` (the Metrics API endpoint access content lives on that page). - `#deploying-supabase-grafana` links → `/docs/guides/telemetry/metrics/grafana-self-hosted`, the page that now holds the Prometheus/Grafana installation instructions those links referenced. 15 files changed, links only — no content changes. ## Additional context Pure documentation link cleanup. Affected files include several guides (`database/connection-management`, `database/inspect`, `platform/performance`, `platform/read-replicas`) and troubleshooting entries that reference the Metrics/Grafana setup guide.
44 lines
2.7 KiB
Plaintext
44 lines
2.7 KiB
Plaintext
---
|
|
title = "High CPU usage"
|
|
topics = [ "platform" ]
|
|
keywords = [ "CPU" ]
|
|
database_id = "3d1bb799-453f-4a6c-9fdc-056f15bec88c"
|
|
---
|
|
|
|
Learn what high CPU usage could mean for your Supabase instance and what could have caused it.
|
|
|
|
## The danger of high CPU usage
|
|
|
|
Every Supabase project runs in its dedicated virtual machine. Your instance will have a different set of hardware provisioned depending on your [compute add-on](/docs/guides/platform/compute-add-ons). Your hardware may not be suitable for the intended workload and may experience high CPU usage.
|
|
|
|
High CPU usage could come with a range of issues:
|
|
|
|
- slower queries
|
|
- disruption of daily backup routines
|
|
- in rare cases, your instance may become unresponsive
|
|
|
|
Moreover, your instance might not be able to handle future traffic spikes if it already has a high CPU usage.
|
|
|
|
## Monitor your CPU
|
|
|
|
You can check your CPU usage directly on the Supabase Platform. For this go to database health in the [Observability section](/dashboard/project/_/observability/database) and select your project.
|
|
|
|

|
|
|
|
It is also possible to monitor your resources and set up alerts using Prometheus/Grafana. You can find a guide for this [here](/docs/guides/telemetry/metrics).
|
|
|
|
## Common reasons for high CPU usage
|
|
|
|
Everything you do with your Supabase project requires compute. Hence, there can be many reasons for high CPU usage. Here are some common ones:
|
|
|
|
- **Query performance:** Queries that take a long time to complete (>1 second) as well as excessive amounts of querying can put a strain on the CPU. Check our guide on [examining query performance](/docs/guides/platform/performance#examining-query-performance).
|
|
- **Missing indexes:** Your database might have to scan through a large amount of data to find the information it needs. Creating indexes helps your database find data faster. Learn more about indexes [here](/docs/guides/database/postgres/indexes).
|
|
- **Unsuitable compute:** The compute size of your Supabase project might not be suitable for your application as you might have more traffic or run resource-intensive operations.
|
|
|
|
## Solving high CPU usage
|
|
|
|
There are two ways to solve high CPU:
|
|
|
|
1. **Optimize performance:** Get more out of your instance's resources by optimizing your usage. Have a look at our [performance tuning guide](/docs/guides/platform/performance#examining-query-performance) and our [production readiness guide](/docs/guides/platform/going-into-prod#performance).
|
|
2. **Upgrade your compute:** You can get a Compute Add-on for your project. Follow [this link](/dashboard/project/_/settings/compute-and-disk) and select your project to see your upgrade options.
|