feature:add about connection config
parent
006af0379f
commit
1336b2b07f
|
@ -11,3 +11,13 @@ fastdfs.http_tracker_http_port = 80
|
|||
|
||||
fastdfs.tracker_servers = 10.0.11.201:22122,10.0.11.202:22122,10.0.11.203:22122
|
||||
|
||||
## Whether to open the connection pool, if not, create a new connection every time
|
||||
fastdfs.connection_pool.enabled = false
|
||||
|
||||
## max_count_per_entry: max connection count per host:port , 0 is not limit
|
||||
fastdfs.connection_pool.max_count_per_entry = 100
|
||||
|
||||
## connections whose the idle time exceeds this time will be closed, unit: second,default value is 60
|
||||
fastdfs.connection_pool.max_idle_time = 60
|
||||
## Maximum waiting time when the maximum number of connections is reached, unit: second, default value is 5
|
||||
fastdfs.connection_pool.max_wait_time = 5
|
||||
|
|
|
@ -8,3 +8,8 @@ http.secret_key = FastDFS1234567890
|
|||
tracker_server = 10.0.11.247:22122
|
||||
tracker_server = 10.0.11.248:22122
|
||||
tracker_server = 10.0.11.249:22122
|
||||
|
||||
connection_pool.enabled = false
|
||||
connection_pool.max_count_per_entry = 100
|
||||
connection_pool.max_idle_time = 60
|
||||
connection_pool.max_wait_time = 5
|
||||
|
|
|
@ -57,9 +57,9 @@ public class ClientGlobal {
|
|||
public static final int DEFAULT_HTTP_TRACKER_HTTP_PORT = 80;
|
||||
|
||||
public static final boolean DEFAULT_CONNECTION_POOL_ENABLED = true;
|
||||
public static final int DEFAULT_CONNECTION_POOL_MAX_COUNT_PER_ENTRY = 50;
|
||||
public static final int DEFAULT_CONNECTION_POOL_MAX_COUNT_PER_ENTRY = 100;
|
||||
public static final int DEFAULT_CONNECTION_POOL_MAX_IDLE_TIME = 60 ;//second
|
||||
public static final int DEFAULT_CONNECTION_POOL_MAX_WAIT_TIME = 3 ;//second
|
||||
public static final int DEFAULT_CONNECTION_POOL_MAX_WAIT_TIME = 5 ;//second
|
||||
|
||||
public static int g_connect_timeout = DEFAULT_CONNECT_TIMEOUT * 1000; //millisecond
|
||||
public static int g_network_timeout = DEFAULT_NETWORK_TIMEOUT * 1000; //millisecond
|
||||
|
|
|
@ -15,7 +15,7 @@ fastdfs.tracker_servers = 185.245.40.70:22122
|
|||
fastdfs.connection_pool.enabled = false
|
||||
|
||||
## max_count_per_entry: max connection count per host:port , 0 is not limit
|
||||
fastdfs.connection_pool.max_count_per_entry = 2
|
||||
fastdfs.connection_pool.max_count_per_entry = 100
|
||||
|
||||
fastdfs.connection_pool.max_idle_time = 60
|
||||
fastdfs.connection_pool.max_wait_time = 5
|
Loading…
Reference in New Issue