22 days ago
Hi Railway team, I need help confirming the correct production setup for our PostgreSQL service.
Our Postgres service prices-db currently shows:
/sys/fs/cgroup/memory.max = 999997440
So the database container appears to be capped at ~1GB RAM.
Our current database size is ~3.7GB:
pricesnapshot: ~1.96GBproduct: ~1.24GBproduct_latest_snapshot: ~371MB
This database supports a write-heavy workload with continuous background workers:
- product refresh jobs
- discovery jobs
- enrichment jobs
- public API reads
- admin dashboard reads
Inside Postgres we currently see:
shared_buffers = 128MBwork_mem = 4MBmaintenance_work_mem = 64MBeffective_cache_size = 4GBmax_connections = 100
We need to scale this database for production. Can you confirm:
- How can we increase the Postgres service memory limit from ~1GB to at least 8GB or 16GB?
- Can Railway Postgres settings like
shared_buffers,work_mem,effective_cache_size, andmax_connectionsbe tuned? - Does Railway Postgres support connection pooling/PgBouncer?
- Does Railway support read replicas for Postgres?
- What plan/setup do you recommend for continuous write-heavy workloads plus fast public API reads?
1 Replies
22 days 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 Railway • 22 days ago
22 days ago
you can increase the memory limit through the service settings and scroll to the Replica Limits, and for connection pooling you can use the PgBouncer template
Attachments