← Connection Pool | Timeout(中文) | HTTPS Configurations →
Request Settings -> Client Settings -> Default Settings, priority from high to low; The default ConnectTimeout is 5 seconds and the ReadTimeout is 10 seconds.
// The client setting is valid for all requests
HttpClientConfig clientConfig = HttpClientConfig.getDefault();
clientConfig.setReadTimeoutMillis(readTimeoutMillis);
clientConfig.setConnectionTimeoutMillis(connectionTimeoutMillis);
IClientProfile profile = DefaultProfile.getProfile(regionId, accesskeyId, accesskeySecret);
profile.setHttpClientConfig(clientConfig);
DefaultAcsClient client = new DefaultAcsClient(profile);
// The request setting, valid only for the current request
request.setSysReadTimeout(readTimeoutMillis);
request.setConnectionTimeoutMillis(connectionTimeoutMillis);
← Connection Pool | Timeout(中文) | HTTPS Configurations →