Npgsql Api Docs

NpgsqlConnection.ConnectionLifeTime Property

Gets the time to wait before closing unused connections in the pool if the count of all connections exeeds MinPoolSize.

[Visual Basic]
Public ReadOnly Property ConnectionLifeTime As Integer
[C#]
public int ConnectionLifeTime {get;}

Property Value

The time (in seconds) to wait. The default value is 15 seconds.

Remarks

If connection pool contains unused connections for ConnectionLifeTime seconds, the half of them will be closed. If there will be unused connections in a second later then again the half of them will be closed and so on. This strategy provide smooth change of connection count in the pool.

See Also

NpgsqlConnection Class | Npgsql Namespace