> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Database

> Answers to common database questions—fixing disabled endpoints, restoring tables, migrating to production, and connection errors.

These answers cover the production database. For full reference, see [Production databases](https://docs.replit.com/features/data-and-storage/development-and-production.md) and [SQL database](https://docs.replit.com/features/data-and-storage/sql-database.md).

> [accordion] My database endpoints are disabled—how do I fix the "endpoint has been disabled" error?
>
> This error means the database compute endpoint is disabled. First, identify the affected database:
>
> 1. Open the **Database** tool and select the database used by the failing app.
> 2. If an **Unpause database** button appears, select it.
> 3. Retry the connection.
>
> If the endpoint keeps getting disabled, check [Account usage](https://replit.com/settings/usage) and your billing settings for an unpaid invoice or usage limit. If the **Unpause database** control is missing, see "My database is frozen and I don't see an Unpause button" before changing any Secrets.
>
> See [Troubleshoot databases](https://docs.replit.com/help/troubleshooting/databases.md) for the full diagnostic flow.

> [accordion] The status page shows a Production Database outage—do I need to file a ticket?
>
> No. If the outage is already listed on [status.replit.com](https://status.replit.com), the team is working on it and a ticket won't speed up the fix. Open the active incident and subscribe to updates to be notified as it progresses.
>
> If your database problem is *not* listed on the status page, [contact Replit Support](https://replit.com/support).

> [accordion] How do I restore a deleted or dropped database table?
>
> Replit supports point-in-time recovery for production databases. Available history depends on the configured recovery window; eligible plans can configure longer retention.
>
> A restore affects the whole database, not just the missing table, and can replace newer data. Review [Data recovery](https://docs.replit.com/features/data-and-storage/data-recovery.md) before restoring. Increasing retention cannot recreate history that wasn't kept.

> [accordion] My database is frozen and I don't see an Unpause button
>
> First, [find which database your app uses](https://docs.replit.com/features/data-and-storage/development-and-production.md#find-which-database-your-app-uses). A `DATABASE_URL` in **Secrets** may point to an intentionally configured external database.
>
> Compare the `DATABASE_URL` secret privately with the connection string in the **Database** tool. If your app should use the Replit-managed database but the secret points to an old connection, the secret is overriding the correct URL. Removing that stale override lets the app use the Replit-managed connection again. A different URL can also be intentional, so don't remove it just because the values differ.
>
> As a last resort, if you've confirmed that the app should use its Replit-managed database and a stale `DATABASE_URL` secret is overriding that connection:
>
> 1. Save the existing secret securely so you can restore it if needed.
> 2. Delete only the conflicting `DATABASE_URL` entry from **Secrets**. Keep unrelated secrets and any intentional external database connection.
> 3. Refresh, reopen the **Database** tool, and check for **Unpause database** again.
> 4. Retry the app's connection. If removing the secret breaks the connection, restore it.
>
> If the control is still missing or the connection still fails, [contact Replit Support](https://replit.com/support) with your project URL and checks completed. Don't share connection strings.

> [accordion] My app is throwing "connection pool exhausted" errors—what does that mean?
>
> Your app is opening more database connections at once than the pool allows. Common causes:
>
> * Connections that aren't closed after each request
> * A traffic spike
> * Slow queries holding connections open
>
> Most frameworks expect a single shared connection pool rather than a new connection per request.
>
> For the fastest fix, open a new Agent chat, describe the error, and ask Agent to check how your app manages database connections.

> [accordion] How do I migrate from the development database to production?
>
> Replit keeps development and production databases separate so test changes don't hit live data. When you publish, Replit identifies schema differences between your development and production databases and runs migrations automatically during build. To run a migration manually, select your production database in the **Database** tool and use the [SQL console](https://docs.replit.com/features/data-and-storage/work-with-your-data.md#run-sql-commands).
>
> Running SQL manually is an unsupported flow with limited support; review [Apply missing objects to production](https://docs.replit.com/help/troubleshooting/databases.md#apply-missing-objects-to-production) before proceeding.
>
> See [Create a production database when publishing](https://docs.replit.com/features/data-and-storage/development-and-production.md) and [Troubleshoot databases](https://docs.replit.com/help/troubleshooting/databases.md).

> [accordion] My database shows "endpoint disabled" even though billing is current
>
> Current billing doesn't rule out a disabled endpoint. Follow the unpause steps above for the affected database.
>
> If unpause fails or the problem recurs, [contact Replit Support](https://replit.com/support) with your project URL, error, and steps attempted.

## Still need help?

If your database question isn't answered here, [contact Replit Support](https://replit.com/support).
