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

# Limits

> Connection limits, storage, and resource quotas

## Plan limits

| Resource                     | Free              | Solo                          | HA Cluster                 |
| ---------------------------- | ----------------- | ----------------------------- | -------------------------- |
| **Price**                    | \$0               | \$15/mo                       | From \$35/node/mo          |
| **Databases**                | 1                 | Multiple (storage permitting) | Unlimited                  |
| **Connections per database** | 5                 | 100                           | 100                        |
| **Storage**                  | 2 GB per database | 55 GB                         | Depends on server type     |
| **Nodes**                    | Shared            | 1 dedicated                   | 1–3 dedicated              |
| **Automatic failover**       | No                | No (single node)              | Yes                        |
| **Backups**                  | Not included      | Daily, 7-day retention        | Daily, 14-day retention    |
| **Point-in-time recovery**   | Not included      | Included                      | Included                   |
| **Monitoring**               | Basic             | Full metrics                  | Full metrics               |
| **SQL Editor**               | Included          | Included                      | Included                   |
| **Extensions**               | pgvector only     | 5 pre-installed extensions    | 5 pre-installed extensions |
| **Inactivity deletion**      | After 30 days     | Never                         | Never                      |

## Storage per server type

| Server type | Available storage | vCPUs | RAM   | Price        |
| ----------- | ----------------- | ----- | ----- | ------------ |
| **Starter** | 55 GB             | 2     | 4 GB  | \$35/node/mo |
| **Growth**  | 135 GB            | 4     | 8 GB  | \$59/node/mo |
| **Scale**   | 295 GB            | 8     | 16 GB | \$99/node/mo |

<Info>Storage listed is fully available for your PostgreSQL database. An additional 20 GB is reserved for the operating system on each node. All nodes in a cluster use the same server type.</Info>

## Connection limits

| Tier           | Max connections | Recommendation                                   |
| -------------- | --------------- | ------------------------------------------------ |
| **Free**       | 5               | Development and testing only                     |
| **Solo**       | 100             | Small production apps on a dedicated VM          |
| **HA Cluster** | 100             | Use connection pooling for high-concurrency apps |

### Connection pooling

For applications that need more than 100 concurrent connections, use a client-side connection pool:

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from psycopg2 import pool

    connection_pool = pool.ThreadedConnectionPool(
        minconn=5,
        maxconn=20,
        dsn="postgresql://user:pass@host:5432/mydb?sslmode=require"
    )

    conn = connection_pool.getconn()
    # ... use connection ...
    connection_pool.putconn(conn)
    ```
  </Tab>

  <Tab title="Node.js">
    ```javascript theme={null}
    const { Pool } = require('pg');

    const pool = new Pool({
      connectionString: 'postgresql://user:pass@host:5432/mydb?sslmode=require',
      max: 20,
      ssl: { rejectUnauthorized: false }
    });

    const res = await pool.query('SELECT 1');
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    // pgx pool handles connection pooling automatically
    pool, err := pgxpool.New(context.Background(),
        "postgresql://user:pass@host:5432/mydb?sslmode=require")
    if err != nil {
        log.Fatal(err)
    }
    defer pool.Close()

    var result int
    err = pool.QueryRow(context.Background(), "SELECT 1").Scan(&result)
    ```
  </Tab>
</Tabs>

## Cluster limits

| Resource                    | Limit                              |
| --------------------------- | ---------------------------------- |
| **Nodes per cluster**       | 1–3                                |
| **Clusters per account**    | No hard limit                      |
| **Databases per cluster**   | No hard limit (storage permitting) |
| **Extensions per database** | 5 available                        |
| **Max vector dimensions**   | 16,000 (pgvector)                  |

## Rate limits

| Action                                          | Limit                   |
| ----------------------------------------------- | ----------------------- |
| **Cluster operations** (create, scale, restore) | 1 at a time per cluster |
| **Manual backups**                              | 1 at a time per cluster |

## Exceeding limits

* **Storage full**: Write operations will fail. Scale to a larger server type or delete unused data.
* **Connection limit reached**: New connections are rejected. Close idle connections or implement connection pooling.
