Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres storage requirements of sepolia and base sepolia are high #5355

Open
rdx4499 opened this issue Apr 16, 2024 · 0 comments
Open

Postgres storage requirements of sepolia and base sepolia are high #5355

rdx4499 opened this issue Apr 16, 2024 · 0 comments

Comments

@rdx4499
Copy link

rdx4499 commented Apr 16, 2024

I am not sure if its a bug or not but I have deployed three same subgraph on thee different testnetwork sepolia, base sepolia and pulsechain testnet. I have only done single transaction on both seplia network, for this postgres database size is 17 GB each , and for pulsechain testnet I have done thousands of transaction but it only takes 377 MB. Below is my docker compose file with network configuration

version: "3"
services:
   graph-node-1:
       image: graphprotocol/graph-node
       ports:
           - "8100:8000"
           - "8101:8001"
           - "8120:8020"
           - "8130:8030"
           - "8140:8040"
       depends_on:
           - ipfs-1
           - postgres-1
       extra_hosts:
           - host.docker.internal:host-gateway
       environment:
           postgres_host: postgres-1
           postgres_user: graph-node
           postgres_pass: let-me-in
           postgres_db: graph-node
           ipfs: "ipfs-1:5001"
           ethereum: "mainnet:https://sepolia.infura.io/v3/aeed801be7e042sf87ebaa7965f8b4cc"
           GRAPH_LOG: info
           DISABLE_BLOCK_INGESTOR: "true"
       restart: always

   ipfs-1:
       image: ipfs/kubo:v0.14.0
       ports:
           - "5201:5001"
       volumes:
           - ./data/ipfs-1:/data/ipfs
       environment:
           IPFS_GC_SCHEDULE: "every hour"
       restart: always

   postgres-1:
       image: postgres:14
       ports:
           - "5433:5432"
       command:
           [
               "postgres",
               "-cshared_preload_libraries=pg_stat_statements",
               "-cmax_connections=200",
           ]
       environment:
           POSTGRES_USER: graph-node
           POSTGRES_PASSWORD: let-me-in
           POSTGRES_DB: graph-node
           PGDATA: "/var/lib/postgresql/data"
           POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
       volumes:
           - ./data/postgres-1:/var/lib/postgresql/data
       restart: always

   graph-node-2:
       image: graphprotocol/graph-node
       ports:
           - "8200:8000"
           - "8201:8001"
           - "8220:8020"
           - "8230:8030"
           - "8240:8040"
       depends_on:
           - ipfs-2
           - postgres-2
       extra_hosts:
           - host.docker.internal:host-gateway
       environment:
           postgres_host: postgres-2
           postgres_user: graph-node
           postgres_pass: let-me-in
           postgres_db: graph-node
           ipfs: "ipfs-2:5001"
           ethereum: "mainnet:https://base-sepolia.g.alchemy.com/v2/icYuU5yFEzd9p35GAP2msUDkGXFZWchM"
           GRAPH_LOG: info
           DISABLE_BLOCK_INGESTOR: "true"
       restart: always

   ipfs-2:
       image: ipfs/kubo:v0.14.0
       ports:
           - "5202:5001"
       volumes:
           - ./data/ipfs-2:/data/ipfs
       environment:
           IPFS_GC_SCHEDULE: "every hour"
       restart: always

   postgres-2:
       image: postgres:14
       ports:
           - "5434:5432"
       command:
           [
               "postgres",
               "-cshared_preload_libraries=pg_stat_statements",
               "-cmax_connections=200",
           ]
       environment:
           POSTGRES_USER: graph-node
           POSTGRES_PASSWORD: let-me-in
           POSTGRES_DB: graph-node
           PGDATA: "/var/lib/postgresql/data"
           POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
       volumes:
           - ./data/postgres-2:/var/lib/postgresql/data
       restart: always

   graph-node-3:
       image: graphprotocol/graph-node
       ports:
           - "8300:8000"
           - "8301:8001"
           - "8320:8020"
           - "8330:8030"
           - "8340:8040"
       depends_on:
           - ipfs-3
           - postgres-3
       extra_hosts:
           - host.docker.internal:host-gateway
       environment:
           postgres_host: postgres-3
           postgres_user: graph-node
           postgres_pass: let-me-in
           postgres_db: graph-node
           ipfs: "ipfs-3:5001"
           ethereum: "mainnet:https://rpc.v4.testnet.pulsechain.com"
           GRAPH_LOG: info
           DISABLE_BLOCK_INGESTOR: "true"
       restart: always

   ipfs-3:
       image: ipfs/kubo:v0.14.0
       ports:
           - "5203:5001"
       volumes:
           - ./data/ipfs-3:/data/ipfs
       environment:
           IPFS_GC_SCHEDULE: "every hour"
       restart: always

   postgres-3:
       image: postgres:14
       ports:
           - "5435:5432"
       command:
           [
               "postgres",
               "-cshared_preload_libraries=pg_stat_statements",
               "-cmax_connections=200",
           ]
       environment:
           POSTGRES_USER: graph-node
           POSTGRES_PASSWORD: let-me-in
           POSTGRES_DB: graph-node
           PGDATA: "/var/lib/postgresql/data"
           POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
       volumes:
           - ./data/postgres-3:/var/lib/postgresql/data
       restart: always

How can I reduce the database size ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant