8 months ago
My PostgreSQL database volume size on Railway has increased significantly, and your observability shows it's over 300MB.
I've investigated using
pg_database_size()and confirmed my actual table and index data is only about [50MB].I ran
SELECT pg_size_pretty(pg_current_wal_lsn() - '0/0'::pg_lsn) AS wal_size;and it shows 201 MB of WAL.I also checked
pg_replication_slots, and there are no active or inactive replication slots.This indicates the WAL is accumulating, and since it's not due to replication slots, it's likely an issue with your internal WAL management, archiving, or a high write volume that's causing it to back up on the volume.
Could you please investigate why the WAL is accumulating and if there's an issue with your internal systems handling it for my instance?
Thanks in advance for all you hard work. love the platform.
Pinned Solution
8 months ago
Looks like you’ve already done some solid digging. If there are no active or inactive replication slots, the WAL hanging around is probably just Railway’s internal cleanup running behind or not catching up quickly. Sometimes their snapshot system or backups take a while to clear out old WAL files, which can make the disk size look bigger for a bit.
Usually this sorts itself out after some time, but if the WAL size just keeps sitting there without dropping, you can try restarting the database from the Railway dashboard. That can sometimes trigger WAL cleanup properly.
If it still sticks, it’s best to open a support ticket and send them the WAL size and the trace you found. Could just be their internal processes are stuck for your instance specifically.
Appreciate you already checking the usual stuff like slots and table size, makes it easier to get to the root of it.
2 Replies
8 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 8 months ago
8 months ago
Looks like you’ve already done some solid digging. If there are no active or inactive replication slots, the WAL hanging around is probably just Railway’s internal cleanup running behind or not catching up quickly. Sometimes their snapshot system or backups take a while to clear out old WAL files, which can make the disk size look bigger for a bit.
Usually this sorts itself out after some time, but if the WAL size just keeps sitting there without dropping, you can try restarting the database from the Railway dashboard. That can sometimes trigger WAL cleanup properly.
If it still sticks, it’s best to open a support ticket and send them the WAL size and the trace you found. Could just be their internal processes are stuck for your instance specifically.
Appreciate you already checking the usual stuff like slots and table size, makes it easier to get to the root of it.
8 months ago
You were right, hit the reset button and it took awhile but now is back to normal. Thanks and good job and great team RAILWAY.
Status changed to Solved chandrika • 8 months ago
