Skip to content

Database Sleeping

Learn when database sleeping takes effect and how to wake up a sleeping database.

Overview

After a period of inactivity, free databases will enter 'sleep' mode. All data will be backed up and stored, but you will not be able to connect to the database.

What is database sleeping

When a database on the free Hobby plan is inactive for 7 days, the database will be enter sleep mode. When a database is sleeping, all data is backed up, but you will not be able to connect to any branches on the database until it has been woken up.

PlanetScale dashboard overview page - Sleeping databases

What happens to my data?

Right before a database enters sleep mode, we make a backup of all data, even if it's outside of the included backup schedule. We will continue to store all data while the database is sleeping. Once you wake the database, all data will be restored.

When do we sleep databases

Here is the criteria we use to determine when a database is eligible to sleep:

  • The database is on the free Hobby plan
  • The database is at least seven days old
  • There have been no rows written or connections to any branches of the database in the past 7 days

If the database meets all of this criteria, it will enter sleep mode.

Unpaid invoice(s)

We also reserve the right to put your database in sleep mode if you have failed to pay on time. Before taking any action, we will send several email reminders for the outstanding invoices. Once all invoices have been paid in full, we will reawaken your database again.

How to prevent a database from sleeping

To prevent a database from entering sleep mode, make sure to connect to any branch of the database at least once every 7 days.

Because database sleeping only applies to databases on the free Hobby plan, another option is to upgrade your database to a paid Scaler or Hobby plan, in which case your database will not be slept for any amount of inactivity.

How to wake a sleeping database

Once your database is sleeping, you can wake it in your PlanetScale dashboard.

PlanetScale dashboard database page - Sleeping database

Steps to wake a sleeping database:

  1. Go to your PlanetScale dashboard
  2. Click on the sleeping database on the overview page
  3. Click the "Wake database" button
  4. Your database will wake up in the same state it was prior to sleeping and will be available to connect to shortly.

Additional assistance

If you need additional assistance or have any questions, contact our the PlanetScale support team, or join our GitHub Discussion board.

Need help?

Get help from the PlanetScale support team, or join our GitHub discussion board to see how others are using PlanetScale.

Was this page useful?
Last updated on August 1, 2022
Help us improve this page
© 2022 PlanetScale Inc.