RE: 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?
For anyone else running into this, adding the following SOAP Client headers seems to have corrected this issue…
$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,