#Postgres slow/timeout

15 messages · Page 1 of 1 (latest)

hard mural
#

Hello,

I'm still in the free trial to test railway infrastructure, atm my app is still in dev, nobody use it but me, the metric are flat almost to 0 but when I run my e2e tests that writes ~150 rows in a few minutes I can see that sometime the app timeout, and the reson seems to be postgres, the only error log I can find in my stack is this pg log:

2025-08-14 17:30:01.315 UTC [74] LOG:  checkpoint complete: wrote 182 buffers (1.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=17.855 s, sync=0.022 s, total=19.032 s; sync files=134, longest=0.008 s, average=0.001 s; distance=768 kB, estimate=768 kB; lsn=0/2FAB2E0, redo lsn=0/2F8FC60

Also, I have one more question, am I right when I say that these pg instances are not managed? Do you offer a managed postgres solution?

thanks

tiny pendantBOT
#

Project ID: 0efc8ea7-b963-4d84-b9de-c6e45c058c0f

hard mural
#

0efc8ea7-b963-4d84-b9de-c6e45c058c0f

hard mural
#

btw, this might mean I'm on metal, I'm happy to stay on metal and somehow help if I can

hard mural
#

any update on this?

wide marten
#

Hi! The instances are not managed instances, it just deploys the postgres image and attaches a volume to it.

#

I will escalate this to the team, I wonder if it's related to the I/O issues some instances are having

#

!t

neon troutBOT
#

New reply sent from Help Station thread:

⬆️ This thread has been escalated to the Railway team.

You're seeing this because this thread has been automatically linked to the Help Station thread.

neon troutBOT
#

New reply sent from Help Station thread:

thanks, is not super urgent, but I'm looking to go live soon with my app, I really like railway but if the db has this issues with just me trying the app I'm not sure if it is a good idea to go live

You're seeing this because this thread has been automatically linked to the Help Station thread.

neon troutBOT
#

New reply sent from Help Station thread:

Looking at your application HTTP logs, you have some
499
http status codes, so these appear to be cases where the client is closing the connection, and not an issue between your application and database, or the performance of the database.

You're seeing this because this thread has been automatically linked to the Help Station thread.

neon troutBOT
#

New reply sent from Help Station thread:

yep but I think the client close the connection because the db doesn't respond in time, the only errors I can see are in the db, where in the logs I can see WAL checkpoints taking even 17s to write, this seems similar to other people issues with postgres

You're seeing this because this thread has been automatically linked to the Help Station thread.

neon troutBOT
#

New reply sent from Help Station thread:

Hello,
17-second intervals for WAL writes are normal in Postgres. Postgres doesn't write WAL to disk immediately - it spreads writes out over determined time periods for efficiency, so that metric alone isn't indicative of a performance problem.
To identify what's causing your application slowdown, I'd recommend adding tracing to pinpoint where the performance bottleneck is actually occurring.
Best,
Brody

You're seeing this because this thread has been automatically linked to the Help Station thread.

neon troutBOT
#

New reply sent from Help Station thread:

yeah I've done some research after writing and found out my ignorance on this bit, I'll do some more tests to understand if it's my app or not

You're seeing this because this thread has been automatically linked to the Help Station thread.