w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Why and when should an idle database connection be retired from a connection pool?

Two main reasons:

a) they take up resources on the server (not terribly much since the connection is idle)

b) sometimes connections timeout themselves after periods of inactivity. You want to either close them before that, or run some periodic "ping" SQL to make sure they are still alive. Otherwise you'd get an error on the next SQL you want to execute.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.