javascript - Handling long response time for REST API -




i have created javascript based rest api page (private chrome extension) integrates oracle tool , fetches response. works fine if response received within around 3-5 mins however, if takes additional time gives err_empty_response error.

i have tried xhr.timeout still gives same err_empty_response error. how can ask javascript wait more time?

thanks..

if making ajax call server , want increase waiting time of response need set "timeout" interval @ server side.

in nodejs giving way can apply @ server side increase timeout period.

in app.js file(express framework)

write down following code

 app.use(function(req, res, next) {  //set time out request 24hour  req.connection.settimeout(24 * 60 * 60 * 1000);  next();  }); 

you can refer this

http keep-alive timeout

proper use of keepalive in apache htaccess

you need @ server side





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -