Skip to content
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

Is there a connection keep alive hook? #267

Open
sarus opened this issue Jun 14, 2019 · 0 comments
Open

Is there a connection keep alive hook? #267

sarus opened this issue Jun 14, 2019 · 0 comments

Comments

@sarus
Copy link

sarus commented Jun 14, 2019

Hello,

I wanted to see if there was a built-in way or best practice for implementing a keep alive function to ensure that connections in the connection pool do not timeout after being idle for X number of seconds. For example, if I have a pool with connections that will disconnect if left idle for 600 seconds, then I would be looking for a way to guarantee that a keep alive function is executed at least once per connection every 600 seconds (ideally taking into account the last time the connection was acquired so that the keepalive only runs if a connection has not been acquired within the idle window).

This capability is useful where keeping a long running connection alive is a cheap operation but destroying and creating a new connection from scratch is expensive.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant