Skip to content

Commit 6a7b7be

Browse files
2881028810
authored andcommitted
- 优化 IdleTimeout 默认值为 20 秒; #194
1 parent fc4071b commit 6a7b7be

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed

Providers/FreeSql.Provider.MySql/MySqlAdo/MySqlConnectionPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class MySqlConnectionPoolPolicy : IPolicy<DbConnection>
4848
public string Name { get; set; } = "MySql MySqlConnection 对象池";
4949
public int PoolSize { get; set; } = 100;
5050
public TimeSpan SyncGetTimeout { get; set; } = TimeSpan.FromSeconds(10);
51-
public TimeSpan IdleTimeout { get; set; } = TimeSpan.Zero;
51+
public TimeSpan IdleTimeout { get; set; } = TimeSpan.FromSeconds(20);
5252
public int AsyncGetCapacity { get; set; } = 10000;
5353
public bool IsThrowGetTimeoutException { get; set; } = true;
5454
public int CheckAvailableInterval { get; set; } = 5;

Providers/FreeSql.Provider.Odbc/Dameng/OdbcDamengAdo/OdbcDamengConnectionPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class OdbcOracleConnectionPoolPolicy : IPolicy<DbConnection>
7070
public string Name { get; set; } = "Dameng OdbcConnection 对象池";
7171
public int PoolSize { get; set; } = 100;
7272
public TimeSpan SyncGetTimeout { get; set; } = TimeSpan.FromSeconds(10);
73-
public TimeSpan IdleTimeout { get; set; } = TimeSpan.Zero;
73+
public TimeSpan IdleTimeout { get; set; } = TimeSpan.FromSeconds(20);
7474
public int AsyncGetCapacity { get; set; } = 10000;
7575
public bool IsThrowGetTimeoutException { get; set; } = true;
7676
public int CheckAvailableInterval { get; set; } = 5;

Providers/FreeSql.Provider.Odbc/Default/OdbcAdo/OdbcConnectionPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class OdbcConnectionPoolPolicy : IPolicy<DbConnection>
5353
public string Name { get; set; } = "Default OdbcConnection 对象池";
5454
public int PoolSize { get; set; } = 100;
5555
public TimeSpan SyncGetTimeout { get; set; } = TimeSpan.FromSeconds(10);
56-
public TimeSpan IdleTimeout { get; set; } = TimeSpan.Zero;
56+
public TimeSpan IdleTimeout { get; set; } = TimeSpan.FromSeconds(20);
5757
public int AsyncGetCapacity { get; set; } = 10000;
5858
public bool IsThrowGetTimeoutException { get; set; } = true;
5959
public int CheckAvailableInterval { get; set; } = 5;

Providers/FreeSql.Provider.Odbc/GBase/OdbcGBaseAdo/OdbcGBaseConnectionPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class OdbcPostgreSQLConnectionPoolPolicy : IPolicy<DbConnection>
6262
public string Name { get; set; } = "GBase OdbcConnection 对象池";
6363
public int PoolSize { get; set; } = 50;
6464
public TimeSpan SyncGetTimeout { get; set; } = TimeSpan.FromSeconds(10);
65-
public TimeSpan IdleTimeout { get; set; } = TimeSpan.Zero;
65+
public TimeSpan IdleTimeout { get; set; } = TimeSpan.FromSeconds(20);
6666
public int AsyncGetCapacity { get; set; } = 10000;
6767
public bool IsThrowGetTimeoutException { get; set; } = true;
6868
public int CheckAvailableInterval { get; set; } = 5;

Providers/FreeSql.Provider.Odbc/MySql/OdbcMySqlAdo/OdbcMySqlConnectionPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class OdbcMySqlConnectionPoolPolicy : IPolicy<DbConnection>
4848
public string Name { get; set; } = "MySql OdbcConnection 对象池";
4949
public int PoolSize { get; set; } = 100;
5050
public TimeSpan SyncGetTimeout { get; set; } = TimeSpan.FromSeconds(10);
51-
public TimeSpan IdleTimeout { get; set; } = TimeSpan.Zero;
51+
public TimeSpan IdleTimeout { get; set; } = TimeSpan.FromSeconds(20);
5252
public int AsyncGetCapacity { get; set; } = 10000;
5353
public bool IsThrowGetTimeoutException { get; set; } = true;
5454
public int CheckAvailableInterval { get; set; } = 5;

Providers/FreeSql.Provider.Odbc/Oracle/OdbcOracleAdo/OdbcOracleConnectionPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class OdbcOracleConnectionPoolPolicy : IPolicy<DbConnection>
7070
public string Name { get; set; } = "Oracle OdbcConnection 对象池";
7171
public int PoolSize { get; set; } = 100;
7272
public TimeSpan SyncGetTimeout { get; set; } = TimeSpan.FromSeconds(10);
73-
public TimeSpan IdleTimeout { get; set; } = TimeSpan.Zero;
73+
public TimeSpan IdleTimeout { get; set; } = TimeSpan.FromSeconds(20);
7474
public int AsyncGetCapacity { get; set; } = 10000;
7575
public bool IsThrowGetTimeoutException { get; set; } = true;
7676
public int CheckAvailableInterval { get; set; } = 5;

Providers/FreeSql.Provider.Odbc/PostgreSQL/OdbcPostgreSQLAdo/OdbcPostgreSQLConnectionPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class OdbcPostgreSQLConnectionPoolPolicy : IPolicy<DbConnection>
6060
public string Name { get; set; } = "PostgreSQL OdbcConnection 对象池";
6161
public int PoolSize { get; set; } = 50;
6262
public TimeSpan SyncGetTimeout { get; set; } = TimeSpan.FromSeconds(10);
63-
public TimeSpan IdleTimeout { get; set; } = TimeSpan.Zero;
63+
public TimeSpan IdleTimeout { get; set; } = TimeSpan.FromSeconds(20);
6464
public int AsyncGetCapacity { get; set; } = 10000;
6565
public bool IsThrowGetTimeoutException { get; set; } = true;
6666
public int CheckAvailableInterval { get; set; } = 5;

Providers/FreeSql.Provider.Odbc/SqlServer/OdbcSqlServerAdo/OdbcSqlServerConnectionPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class OdbcSqlServerConnectionPoolPolicy : IPolicy<DbConnection>
5353
public string Name { get; set; } = "SqlServer OdbcConnection 对象池";
5454
public int PoolSize { get; set; } = 100;
5555
public TimeSpan SyncGetTimeout { get; set; } = TimeSpan.FromSeconds(10);
56-
public TimeSpan IdleTimeout { get; set; } = TimeSpan.Zero;
56+
public TimeSpan IdleTimeout { get; set; } = TimeSpan.FromSeconds(20);
5757
public int AsyncGetCapacity { get; set; } = 10000;
5858
public bool IsThrowGetTimeoutException { get; set; } = true;
5959
public int CheckAvailableInterval { get; set; } = 5;

Providers/FreeSql.Provider.Oracle/OracleAdo/OracleConnectionPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class OracleConnectionPoolPolicy : IPolicy<DbConnection>
7070
public string Name { get; set; } = "Oracle Connection 对象池";
7171
public int PoolSize { get; set; } = 100;
7272
public TimeSpan SyncGetTimeout { get; set; } = TimeSpan.FromSeconds(10);
73-
public TimeSpan IdleTimeout { get; set; } = TimeSpan.Zero;
73+
public TimeSpan IdleTimeout { get; set; } = TimeSpan.FromSeconds(20);
7474
public int AsyncGetCapacity { get; set; } = 10000;
7575
public bool IsThrowGetTimeoutException { get; set; } = true;
7676
public int CheckAvailableInterval { get; set; } = 5;

Providers/FreeSql.Provider.PostgreSQL/PostgreSQLAdo/PostgreSQLConnectionPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class PostgreSQLConnectionPoolPolicy : IPolicy<DbConnection>
6060
public string Name { get; set; } = "PostgreSQL NpgsqlConnection 对象池";
6161
public int PoolSize { get; set; } = 50;
6262
public TimeSpan SyncGetTimeout { get; set; } = TimeSpan.FromSeconds(10);
63-
public TimeSpan IdleTimeout { get; set; } = TimeSpan.Zero;
63+
public TimeSpan IdleTimeout { get; set; } = TimeSpan.FromSeconds(20);
6464
public int AsyncGetCapacity { get; set; } = 10000;
6565
public bool IsThrowGetTimeoutException { get; set; } = true;
6666
public int CheckAvailableInterval { get; set; } = 5;

0 commit comments

Comments
 (0)