Skip to main content

Introduction

Laravel Cloud shows metrics for each database cluster in two places:
  • The database cluster’s page: navigate to Organization > Resources > Databases, click the database cluster, and review the Metrics section.
  • The environment’s Metrics tab: open Monitoring > Metrics in any environment to see the database cluster attached to it alongside the environment’s compute.
Metrics cover the whole database cluster, including every database and schema on it. The charts you see depend on the type of database cluster. Use the time range selector to choose a period, depending on your plan’s retention period.

Laravel MySQL

Laravel MySQL database clusters show the following charts: Storage includes your data, indexes, and MySQL’s binary logs, so it can grow even when your tables do not. When a cluster runs low on storage, Laravel Cloud can upsize it automatically. Sustained high CPU usage usually means the cluster is too small for your workload or that some queries are slow. High memory usage alone does not show that MySQL needs more memory, since it uses memory to cache data. Check query performance and signs of memory pressure before increasing the cluster size, because changing the compute size restarts the cluster with under a minute of downtime. Laravel Nightwatch can show you your slowest queries. See Database sizing and performance to choose a cluster size.

Serverless Postgres

Serverless Postgres database clusters scale their compute automatically, so they measure compute in compute units instead of CPU and memory percentages: A cluster that scales to zero uses no compute while it sleeps, which shows as low or zero values in the Compute chart. The Compute total measures how long the cluster’s compute ran and at what size, not its CPU utilization. A cluster that runs continuously at a small size can have a high total without needing more compute. To see whether the cluster reaches its limit, compare individual points to your maximum compute units. For ranges up to Last 7 days, each point covers one hour, so a point equal to your maximum means the cluster ran at its maximum for that whole hour. If queries are slow while the cluster runs at its maximum, look for slow or unindexed queries first. If the cluster still needs more compute, raise the maximum. Changing the compute unit range restarts the cluster’s compute and briefly drops existing connections.

AWS RDS

AWS RDS database clusters show the following charts: When an RDS cluster has read replicas, use the instance selector on the database cluster’s page to switch between the Primary instance and each replica. If Connections approaches your database’s connection limit, new connections may fail. Reduce the number of replicas or workers that connect at once, or use a larger instance size.

Canvas hovercard

To check a database cluster at a glance, hover over its card in the infrastructure canvas. The hovercard shows sparklines for the last 6 hours with their most recent values:
  • Laravel MySQL and AWS RDS: CPU, MEM, and Storage used out of the provisioned storage.
  • Serverless Postgres: CU, the compute unit hours used in the most recent hour, and Storage.
If you can view your organization’s usage, the hovercard also shows the database cluster’s Current spend.