R
Railway15mo ago
Martynas

Timeout

Hi what's the timeout of postgres container on railway? Couldn't find that setting
12 Replies
Percy
Percy15mo ago
Project ID: N/A
Brody
Brody15mo ago
do you mean connection timeout?
Martynas
MartynasOP15mo ago
Yes
Brody
Brody15mo ago
that would be a configuration with your postgres client sometimes its a query parameter on the url ?connect_timeout=10 (for prisma)
Martynas
MartynasOP15mo 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
Brody15mo 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
MartynasOP15mo ago
There doesn't seem to be pool minimum on sqlalchemy
Brody
Brody15mo ago
there has to be something similar
Martynas
MartynasOP15mo 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
Brody15mo ago
not too sure, I'm just trying to set you in the right direction
Martynas
MartynasOP15mo ago
I mean when you said set the pool minimum to zero what did you mean exactly?
Brody
Brody15mo ago
I clarified
Want results from more Discord servers?
Add your server