diff --git a/fdfs_client.conf b/fdfs_client.conf index 7cabb47..7d56fce 100644 --- a/fdfs_client.conf +++ b/fdfs_client.conf @@ -9,7 +9,7 @@ tracker_server = 10.0.11.247:22122 tracker_server = 10.0.11.248:22122 tracker_server = 10.0.11.249:22122 -connection_pool.enabled = true +connection_pool.enabled = false connection_pool.max_count_per_entry = 100 connection_pool.max_idle_time = 60 connection_pool.max_wait_time_in_ms = 5000 diff --git a/src/main/java/org/csource/fastdfs/ClientGlobal.java b/src/main/java/org/csource/fastdfs/ClientGlobal.java index fe8baef..b102fdc 100644 --- a/src/main/java/org/csource/fastdfs/ClientGlobal.java +++ b/src/main/java/org/csource/fastdfs/ClientGlobal.java @@ -209,7 +209,7 @@ public class ClientGlobal { g_connection_pool_max_idle_time = Integer.parseInt(poolMaxIdleTime) * 1000; } if (poolMaxWaitTimeInMS != null && poolMaxWaitTimeInMS.trim().length() != 0) { - g_connection_pool_max_wait_time_in_ms = Integer.parseInt(poolMaxWaitTimeInMS) * 1000; + g_connection_pool_max_wait_time_in_ms = Integer.parseInt(poolMaxWaitTimeInMS); } } diff --git a/src/main/resources/fastdfs-client.properties b/src/main/resources/fastdfs-client.properties deleted file mode 100644 index 8722894..0000000 --- a/src/main/resources/fastdfs-client.properties +++ /dev/null @@ -1,17 +0,0 @@ -## fastdfs-client.properties - -fastdfs.connect_timeout_in_seconds = 5 -fastdfs.network_timeout_in_seconds = 30 - -fastdfs.charset = UTF-8 - -fastdfs.http_anti_steal_token = false -fastdfs.http_secret_key = FastDFS1234567890 -fastdfs.http_tracker_http_port = 80 - -fastdfs.tracker_servers = 10.0.11.201:22122,10.0.11.202:22122,10.0.11.203:22122 - -fastdfs.connection_pool.enabled = false -fastdfs.connection_pool.max_count_per_entry = 50 -fastdfs.connection_pool.max_idle_time = 60 -fastdfs.connection_pool.max_wait_time_in_ms = 5000 \ No newline at end of file diff --git a/src/main/resources/fastdfs-client.properties.sample b/src/main/resources/fastdfs-client.properties.sample index 9a1f07e..ebb84f8 100644 --- a/src/main/resources/fastdfs-client.properties.sample +++ b/src/main/resources/fastdfs-client.properties.sample @@ -17,5 +17,8 @@ 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: Millisecond, default value is 5000 fastdfs.connection_pool.max_wait_time_in_ms = 5000 \ No newline at end of file