I'n a web portal application I'm debugging hundreds of 'clients' have their connection strings stored in a cache from which the code pulls connection strings when a client needs to query the database. The issue is that periodically we see connection timeout errors. The default connection timeout is 5 seconds in the connection strings and the connection lifetime value is 900 seconds.
My question is this: if in the course of a user's session the connection lifetime value is exceeded...say they don't do any database work for fifteen minutes....the next time a call to the database is made is it possible the connection could no longer be valid thus causing an error? (I apolgize in advance for not having the exact error text handy.)
When a connection is returned to the pool, its creation time is compared with the current time, and the connection is destroyed if that time span (in seconds) exceeds the value specified by Connection Lifetime.