24 days ago
Hi Railway team,
We run the Postgres HA template (Patroni + etcd + HAProxy) in project enigma-backend (2b3fa114-cb6e-4fce-be47-fc61adc5435b), production environment, region asia-southeast1-eqsg3a. On 21 October 2026 we had an unplanned failover that we traced to disk write stalls on the etcd volumes.
Timeline (UTC):
- 04:38:56–04:39:00 etcd-1 (etcd leader at the time) logged slow fdatasync took 4.200787039s, expected-duration 1s, plus leader failed to send out heartbeat on time; took too long, leader is overloaded likely from slow disk.
- 04:38:58 etcd-2 started an election and became leader at term 54.
- 04:39:00 Patroni on Postgres-3 (the primary) failed its lease keepalive with not a primary lessor, logged failed to update leader lock, and did Demoting self (immediate-nolock). Postgres shut down immediately.
- 04:39:09 Postgres-3 promoted itself again. HAProxy had no primary for about 11 seconds, and clients saw server closed the connection unexpectedly.
- 04:40:41–04:40:48 etcd-3 logged slow fdatasync took 7.653132093s. It was a follower, so there was no election.
Volumes affected:
- etcd-1-volume (13250b8b-688e-454e-ac41-ebbb5c2e1db0)
- etcd-3-volume
Two different volumes stalling within two minutes of each other suggests a storage or host problem in the region, not one bad disk. etcd-1 showed no other slow writes in the previous 7 days.
Questions:
- Was there a storage latency event in asia-southeast1-eqsg3a around 04:38–04:41 UTC on 21 October 2026?
- Can the etcd volumes get storage with more consistent write latency, or be placed on separate hosts?
- The template runs etcd with the default heartbeat (100 ms) and election timeout (1000 ms). Do you support or recommend setting ETCD_HEARTBEAT_INTERVAL=500 and ETCD_ELECTION_TIMEOUT=5000 on the etcd services, so a short disk stall doesn't cause an etcd election and a Postgres failover? Would you consider changing the template defaults?
- Is there a recommended way to restart the etcd members one at a time without causing a Patroni demotion?
Thanks,
Pranjal
1 Reply
Status changed to Awaiting Railway Response Railway • 24 days ago
24 days ago
Thanks for the detailed timeline.
The three etcd volumes in your production environment are already placed on separate hosts, so etcd-1 and etcd-3 were not sharing a disk or a machine when they stalled. We have not been able to establish the cause of the write stalls between 04:38 and 04:41 UTC on 21 October, so we can't confirm or rule out a storage latency event in the region for that window.
On storage: each of those volumes runs with the standard Pro volume limits of 3,000 IOPS and 70 MB/s. Higher volume throughput is available on Enterprise, and there isn't a separate lower-latency storage tier on Pro.
The etcd services deployed from the template are services in your own project, so their environment variables, including the heartbeat and election timeout settings, are yours to set from each service's variables. Changing them redeploys that service, so with Patroni depending on etcd quorum it is worth changing one member at a time and letting it rejoin before moving to the next. We can't commit to changing the template defaults from here.
Separately, we have an ongoing incident that we are tracking here: https://status.railway.com/incident/QH8L8B3E
We'll keep you updated with any developments on that status page. Our support site is also affected, so replies to support requests may be delayed
Status changed to Awaiting User Response Railway • 24 days ago
15 days ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 15 days ago