How to make long-running RESTMessageV2 call using MID?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2015 05:13 PM
Hi All,
I am on Fuji Patch 8.
The endpoint is expected to take 11 minutes to respond, but the call from REST message times out.
Here is the ECC response:
<results error="The request failed: Socket timeout" probe_time="185236">
I have also set the property:
glide.rest.outbound.ecc_response.timeout to 1500000
glide.http.timeout to 1500000
glide.http.connection_timeout to 1500000
Here is the code I run:
var restMessage = new sn_ws.RESTMessageV2( 'ABC', 'get' );
restMessage.setEccParameter( 'skip_sensor', 'true' );
restMessage.setStringParameter( 'url', 'https://abc.blah.com' );
restMessage.setStringParameter( 'resource_name', 'books' );
restMessage.setStringParameter( 'query', 'active=TRUE' );
restMessage.setHttpTimeout(150000);
restMessage.execute();
Why is this timing out at roughly 3 minutes?
Are the parameters having no effect?
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2015 06:57 PM
Hi David,
Try this
var restMessage = new sn_ws.RESTMessageV2( 'ABC', 'get' );
restMessage.setEccParameter( 'skip_sensor', 'true' );
restMessage.setStringParameter( 'url', 'https://abc.blah.com' );
restMessage.setStringParameter( 'resource_name', 'books' );
restMessage.setStringParameter( 'query', 'active=TRUE' );
restMessage.setHttpTimeout(150000);
var response = restMessage.execute();
response.waitForResponse(150000);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2015 10:16 AM
Thank you Matt.
Unfortunately this didn't work. I did a waitForResponse( 15*60) to wait 15 minutes...and the timeout still says 3 minutes.
The call in the background script DID take 15 minutes to complete, but I was watching the ECC queue and see that it times out at 3 minutes.
What is needed I believe is for the MID server to adjust it's HTTP timeout.
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2017 07:06 AM
Hey David,
Did you ever figure out a way to manage this? I think I might have a similar problem.
Thanks!
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2017 10:14 AM
Matt,
I am afraid the solution you provided is not working.
We are having the same issue with long response times. We have tried overriding the default glide.rest.outbound.ecc_response.timeout property using the REST API response.waitForResponse() method but did not work
Any Ideas?
Thanks
Miguel