Timeout

Hi what's the timeout of postgres container on railway? Couldn't find that setting
12 Replies
Percy
Percy9mo ago
Project ID: N/A
Brody
Brody9mo ago
do you mean connection timeout?
Martynas
Martynas9mo ago
Yes
Brody
Brody9mo ago
that would be a configuration with your postgres client sometimes its a query parameter on the url ?connect_timeout=10 (for prisma)
Martynas
Martynas9mo ago
I am using sqlalchemy, and it seems like old connections are not recycled. I am not setting connection timeout for the database so I assume it just uses default, but I am also not setting time out on the sqlalchemy pool as after some time new sessions are impossible. I think this is out of scope of railway, but just wanted to make sure
Brody
Brody9mo ago
I mean set the pool minimum to zero, or set an equivalent setting to zero, so that unused connections can be cleaned up nah this question is not out of scope
Martynas
Martynas9mo ago
There doesn't seem to be pool minimum on sqlalchemy
Brody
Brody9mo ago
there has to be something similar
Martynas
Martynas9mo ago
What's pool minimum according to you? There is pool_size, max_overflow, pool_recycle, pool_timeout max_overflow defaults to 10, pool_size to 5, timeout seems to default to 30, this is for the queue pool
Brody
Brody9mo ago
not too sure, I'm just trying to set you in the right direction
Martynas
Martynas9mo ago
I mean when you said set the pool minimum to zero what did you mean exactly?
Brody
Brody9mo ago
I clarified