Have a java application which makes a http call to a ruby application which execute certain sql queries and gives back an http response of 200 to the java appilcation if success, My problem is the ruby application takes more than 5min to complete the execution while checking the log of the java application after almost 3min it is given as gateway time out exception.How to solve this problem?
java http call to ruby application:
GetMethod get = new GetMethod(URL to ruby application);
Exception exception = null;
try {
// Get HTTP client
HttpClient httpclient = new HttpClient();
int resultCode = httpclient.executeMethod(get);
// Display status code
if (log.isInfoEnabled()) {
log.info("response status code: "
+ resultCode);
// Display response
log.info("Response body: " + get.getResponseBodyAsString());
}
if (resultCode != 200) {
log.error("Failed with status code: "
+ resultCode);
log.error("Response body: " + get.getResponseBodyAsString());
}
}