Sophon: PostgreSQL in Docker too slow to catch up to chainhead #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Sophon node is unable to sync to chainhead, likely due to PostgreSQL performance issues when running in a Docker container.
Observed Behavior
On rpc-de-13, the sophon-mainnet node was stuck in a restart loop with the following error:
This migration error may be a symptom of underlying database performance issues causing incomplete or corrupted state.
Hypothesis
Sophon uses PostgreSQL as its database backend. Running PostgreSQL in Docker with default settings may not provide adequate I/O performance for blockchain sync workloads, which are write-heavy and require consistent low-latency disk access.
Investigation Needed
PostgreSQL configuration: Check if Sophon's postgres container has optimized settings for blockchain workloads (shared_buffers, wal_buffers, checkpoint settings, etc.)
Volume configuration: Verify if postgres data volume is using appropriate storage driver and mount options
I/O performance: Compare postgres I/O metrics in Docker vs bare metal
Alternative approaches:
Current Status
References