Insufficient space
To protect your cluster from crashing, if a cluster has very little space left (typically 5% or less), we will automatically move it into read-only mode. The specific scenarios are:Storage Type | Scenario | Remediation |
---|---|---|
Network-attached storage | Clusters with Autoscaling disabled or where your current disk size is approaching your configured Autoscaling maximum | Increase the cluster disk size manually or increase the storage limit on disk autoscaling |
PlanetScale Metal | When your data is approaching the storage size of your cluster | Increase the cluster size |
PlanetScale will send notifications via email and webhook (if enabled) when your storage exceeds 60, 75, 85, 90, and 95 percent, respectively. You can also track disk utilization via Metrics. Emails are sent to all Organization and Database administrators. It is critical that these email addresses are monitored regularly.
Replication lag
If your cluster reaches an extremely high amount of replication lag, we’ll also put the cluster in read-only mode. Specifically, we monitor replication lag of all replicas compared to the settingmax_slot_wal_keep_size
which we default to 4GB. If all replicas go over that lag amount, we will enable read-only mode. At that point, because we use quorum
based synchronous replication, at the point your replication lag is this high, you will see write transactions take minutes or longer to apply to the cluster (even before read-only mode). We enable read-only mode in that situation to ensure replicas have some time to catch up without any write traffic.
If you see this happening frequently, we recommend sizing your cluster up, or upgrading to a metal cluster in order to keep up with high rates of write traffic.