Our scala/thrift service is using twitter finagle 2.12-18.10.0 with java8. The Service is working fine for single request or handful of requests but when we try to hit the service with lot many requests we are getting
'com.twitter.finagle.ChannelClosedException: ChannelException at remote address: hostname:9091 from service: calcservice-thrift. Remote Info: Upstream Address: Not Available, Upstream id: Not Available,
at org.apache.thrift.TApplicationException.readFrom(TApplicationException.java:131)
sample client that hits server (it fails intermittently)
log.info("started");
IntStream.range(0,500)
.parallel()
.forEach(i->{
try {
//remote call to finagle service
}
catch(Exception e){
log.error("error " ,e);
}
});
log.info("end");
why does the server randomly closes the channel. what could be the probable fix for it