on 2010 Nov 05 8:41 AM
When using the .net data provider one can use connection pooling and provide also a max number of pooled connections. But how to define a timeout for the pooled connections (Version is 11.0.1.2506)
Scenario is: at start the application is using 20 connections, but 10 of these will never be reused. My observation is, that these 10 are kept open nevertheless as long as the application runs. Does any setting exsist to limit the life time of an inactive connection in the pool, or have I been just not patient enough to see the timeout?
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Note that the -ti (idle timeout) and tl (liveness timeout) do determine when the server and/or client will automatically drop the connection but in this case it would be better to use Minghai's suggestion of using .Net's connection parameter 'connection lifetime' to tell .Net to drop idle connections. Doing so will ensure that the connections are closed 'nicely' rather than having the connections dropped from underneath .Net's feet (so-to-speak).
You should use the 'connection lifetime' parameter which specifies how long the connection will stay in the pool ( in seconds ).The default is 0 which means the connection will stay forever. The only time the provider checks the lifetime of a connection is when the connection is closed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does that affect how long SQL Anywhere keeps the underlying database connection open? Somehow, I think not: http://blogs.msdn.com/b/angelsb/archive/2004/09/20/231963.aspx
User | Count |
---|---|
64 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.