You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PoolingClientConnectionManager http client time out is set wrongly, which makes client is parking there when swift sever is busy even socketTimeout is set
#123
Open
l0f011l opened this issue
Jan 7, 2017
· 0 comments
this.httpClient = new DefaultHttpClient(connectionManager);
if (socketTimeout != -1) {
LOG.info("JOSS / Set socket timeout on HttpClient: "+socketTimeout);
HttpParams params = this.httpClient.getParams(); HttpConnectionParams.setSoTimeout(params, socketTimeout);
}
socketTimeout value should be set to be the value of "http.conn-manager.timeout", as PoolingClientConnectionManager use it instead of "SO_TIMEOUT = "http.socket.timeout";"
if (timeout > 0) { -- timeout = value of http.conn-manager.timeout, not “http.socket.timeout”
deadline = new Date
(System.currentTimeMillis() + tunit.toMillis(timeout));
}
try {
if (this.cancelled) {
throw new InterruptedException("Operation interrupted");
}
boolean success = false;
if (deadline != null) {
success = this.condition.awaitUntil(deadline); } else {
this.condition.await();
success = true;
}
The text was updated successfully, but these errors were encountered:
l0f011l
changed the title
PoolingClientConnectionManager http client time out is set wrongly, which makes client is parking there even socketTimeout is set
PoolingClientConnectionManager http client time out is set wrongly, which makes client is parking there when swift sever is busy even socketTimeout is set
Jan 7, 2017
this.httpClient = new DefaultHttpClient(connectionManager);
if (socketTimeout != -1) {
LOG.info("JOSS / Set socket timeout on HttpClient: "+socketTimeout);
HttpParams params = this.httpClient.getParams();
HttpConnectionParams.setSoTimeout(params, socketTimeout);
}
socketTimeout value should be set to be the value of "http.conn-manager.timeout", as PoolingClientConnectionManager use it instead of "SO_TIMEOUT = "http.socket.timeout";"
if (timeout > 0) { -- timeout = value of http.conn-manager.timeout, not “http.socket.timeout”
deadline = new Date
(System.currentTimeMillis() + tunit.toMillis(timeout));
}
try {
if (this.cancelled) {
throw new InterruptedException("Operation interrupted");
}
boolean success = false;
if (deadline != null) {
success = this.condition.awaitUntil(deadline);
} else {
this.condition.await();
success = true;
}
The text was updated successfully, but these errors were encountered: