-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pg connection max lifetime? #5123
Comments
Please see |
Hi, thanks for reply. This is idle timeout, but I mean forcing recycle even if connection hasn't been idle for X seconds |
@domasx2 We've implemented this as essentially a bug fix, awaiting review. See #5087 and attached PRs At the moment it works like this: when a thread takes a connection from the pool, if it is older than 60sec it will be destroyed. This can (probably should) be made configurable. Note the idle timeout still comes into play. Setting it to 60s would ensure connections are always closed approximately every 60 sec |
@domasx2 Any reason why you would want to do this? As @jberryman pointed out, we might add this as a workaround for a leak that we discovered in libpq but not as a feature. |
Hey, |
Hi,
There a way to specify max lifetime of a pooled connection, so it's closed after X seconds and a new one is opened?
Thanks
The text was updated successfully, but these errors were encountered: