Skip to content

Convex database taking up 11 GB of space with few documents #235

@hikariatama

Description

@hikariatama

Hi! Started using Convex not long ago. My project has quite a lot of document changes and has been running for about 4 months of not so active beta usage (<5 users).

For some reason, self-hosted Convex backend does not clear out old documents, which causes the database to grow uncontrollably fast...

 schemaname |     table_name      | total_size | table_size | index_size 
------------+---------------------+------------+------------+------------
 public     | documents           | 10061 MB   | 6437 MB    | 3625 MB
 public     | indexes             | 34 MB      | 12 MB      | 22 MB
 public     | persistence_globals | 232 kB     | 8192 bytes | 224 kB
 public     | leases              | 24 kB      | 8192 bytes | 16 kB
 public     | read_only           | 8192 bytes | 0 bytes    | 8192 bytes

With 11698730 total documents (revisions) and 499628 distinct ones it seems like a pretty big overhead.

I'm not here to say "Convex is bad", since I'm not really an expert on how it works internally.

If you have a guide on how to clear out those stale documents properly, I would appreciate it <3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions