smarter connection pool management