Error Fetching http headers

We have an intranet with a page that retrieves sales orders from NetSuite for viewing by our customer service team. This page makes 5 SOAP calls to get all of the information of for the order. This includes the order details, notes, item tracking, etc.

We have one user that frequently gets a blank screen and, through some troubleshooting code, we can see that the requests are failing with the error “Error Fetching http headers”.  This started happening a few months ago with a different order import integration program that also uses SOAP calls and we able to mitigate that by re-instantiating the connection service just before the SOAP call as it seemed they were timing out. But that seems to not have helped with our intranet page.

Any ideas on what could be causing this or how to correct it?

Beginner Asked on September 10, 2019 in SuiteTalk.
Add Comment
5 Answer(s)

Depending on how many integrations you have using SOAP(SuiteTalk) you may be hitting Concurrency Limits.
While this does not address your problem directly I will suggest you consider moving your Intranet integration to use a Restlet(I would try to move everything I can to Restlets because SOAP is such an old and slow protocol I will avoid to use every single time.)

Just by moving this to a Restlet you automatically go from 5 calls to just 1.

Rookie Answered on September 10, 2019.
Add Comment

I agree that it sounds like you’re occasionally hitting concurrency limits.  That would explain the empty responses that you’re getting from time to time. I think that if you were to look at the HTTP response codes being returned, you’d see something along the lines of a 429 response, indicating that you’re making too many requests in a short period of time.

You mentioned having to make five SOAP / SuiteTalk requests in order to gather all of the data needed by your customer service team. As alien4u suggested, if you were  develop a RESTlet, you might be able to make a single call to NetSuite to get all of the data that you need. That should help to eliminate or at least reduce the frequency of the concurrency issue. I suspect that you would see better overall performance as well.

Good luck!

Rookie Answered on September 10, 2019.
Add Comment

For anyone else running into this, adding the following SOAP Client headers seems to have corrected this issue…

//set the Headers of Soap Client.
$client = new SoapClient($wsdlUrl, array(
‘trace’ => true,
‘keep_alive’ => true,
‘connection_timeout’ => 5000,
‘cache_wsdl’ => WSDL_CACHE_NONE,
‘compression’   => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE,
));
Beginner Answered on September 12, 2019.

Interesting – and a good find.

If that’s helping to prevent the issue, then it seems that your app was getting occasional timeouts when trying to get the WSDL from NetSuite. I suspect that increasing the timeout to 5,000 seconds is what is really helping.

You might want to cache the WSDL (by changing “WSDL_CACHE_NONE” to “WSDL_CACHE_DISK” for example). This will reduce the number of times that your app needs to fetch the WSDL from NS, which should improve performance a bit. Setting “trace” to false, and “keep_alive” to false, might also help.

I’m glad you found a way to resolve this.

on September 12, 2019.
Add Comment

I am no where near my concurrency limits and yes, I plan to go restlet, when the resources become available. But I’d like to keep this limping along for a little while. It is strange that before May, we had no issues with this. Sometime in May, it started killing us.

Beginner Answered on September 10, 2019.

Consider installing the APM Bundle (Application Performance Management) (Official NetSuite bundle ID: 67350 ) to actually check the SOAP Integrations, that would give you a better view of your concurrency, even if you think you are not near the limit, this behavior indicates you are reaching that limit.

on September 10, 2019.
Add Comment

I loaded APM and it agrees that I am not hitting limits…

RE: Error Fetching http headersAPM- General Concurrency

I seem to be maxing out at no more than 75% occasionally.  The “exceeding” chart is empty…

And I do understand and utilize restlets as well. I just do not want to have to redevelop this particular app to use a restlet at this moment.

 

Beginner Answered on September 10, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor