0
votes

I'm working with a web application that is served via the Liberty Webserver. I make a rest call out to another website that I do not have control over and it returns slowly. If I make a very basic request then I get data back in my application, but any request that takes more than 60 seconds times out. I've tried this request out of my application and it returns data in a 2-3 minutes, which is fine for what I'm doing.

How do I extend the timeout in server.xml so that the webserver will wait longer before timing out?

I've tried the settings httpOptions, tcpOptions, and transaction.

The call that consistently times out at 60 seconds is made in javascript like this. A timeout isn't set in the code so it shouldn't timeout:

var xmlHttp = new XMLHttpRequest();
function httpGet(theUrl){ 
    xmlHttp.open("GET", theUrl, false); // false for synchronous request
    xmlHttp.send( null );
    return xmlHttp.responseText;
}
response = httpGet(“SOMEURL”)

I'm using Websphere Application Server 17.0.0.1 Base

1
how do you make the call out, what API are you using? The httpOptions and tcpOptions control incoming requests, they don't apply to outgoing requests. - Alasdair
I do a call with javascript via XMLHttpRequest. - Joshua Hedges
Websphere Application Server 17.0.0.1 Base - Joshua Hedges
Is 'SOMEURL' also liberty? If all liberty does here is serve the javascript that makes the call, this is not a liberty question - covener
Liberty is running this server implementing the javascript and accepting the response. I know the url responds from testing calls outside of this code. Javascript won't timeout if a timeout isn't set. I think it's a setting in the liberty webserver. - Joshua Hedges

1 Answers

0
votes

Other functions of the application were extendable past 60 seconds, so this timeout was probably internal to the rails application, not the webserver.

There are many options for setting the libery webserver timeouts which can be found here: https://www.ibm.com/support/knowledgecenter/SSRTLW_8.5.5/com.ibm.websphere.wlp.nd.multiplatform.doc/autodita/rwlp_metatype_4ic.html