PostgreSQL service Ram memory 1gb
nesgallego
PROOP

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.96GB
  • product: ~1.24GB
  • product_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 = 128MB
  • work_mem = 4MB
  • maintenance_work_mem = 64MB
  • effective_cache_size = 4GB
  • max_connections = 100

We need to scale this database for production. Can you confirm:

  1. How can we increase the Postgres service memory limit from ~1GB to at least 8GB or 16GB?
  2. Can Railway Postgres settings like shared_buffers, work_mem, effective_cache_size, and max_connections be tuned?
  3. Does Railway Postgres support connection pooling/PgBouncer?
  4. Does Railway support read replicas for Postgres?
  5. What plan/setup do you recommend for continuous write-heavy workloads plus fast public API reads?
$20 Bounty

1 Replies

Railway
BOT

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


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


Welcome!

Sign in to your Railway account to join the conversation.

Loading...