elixir-ecto / db_connection

Database connection behaviour
http://hexdocs.pm/db_connection/DBConnection.html
306 stars 113 forks source link

Ping all stale connections on idle interval #206

Closed josevalim closed 5 years ago

josevalim commented 5 years ago

One possible downside of this approach is that we may shut down all connections at once and if there is a request around this time, the response time will be higher. However, this is likely better than the current approach, where we ping only the first one, which means we can have a pool of stale connections. Ideally we would introduce some sort of jitter, to ensure we don't disconnect all of them immediately, but this can be in the future. The current behaviour is the same as in v1.0.

josevalim commented 5 years ago

:heart: :green_heart: :blue_heart: :yellow_heart: :purple_heart: