NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
NuSoap - Socket read of headers timed out.


Joined: 05 Mar 2019
Posts: 1
Reply with quote
First of all hi to everyone. im new here!

Let me just give a background.
we have a service running on the server, so we use nusoap to interact with it locally within the server.
* The soap version that we are running is "nusoap.php,v 1.123 2010/04/26 20:15:08.".
* We are not using wsdl.
* we run it on a Nginx server.

I have found a few similar threads similar to this problem but they seem to encounter it everytime, but
we face this at random intervals. and there was no clear solution in those threads either that matched our problem.

Problem?
we get " Socket read of headers timed out" error. with nusoap, the detailed logs are below..


When is the problem being encountered.?
the problem arises 6-8 times out of 100 tries, and we can not seem to identify it.
for eg, if the following error arrises now, if i run it again it will just work without issue,.
the timout is set at 600.
the error happens after 1 second of nusoap makes a POST request, sometines even 2-4 seconds after making the post request.
this seems odd as we have set the timeout at 600.
Note: we have checked the inputs, they are correct,

the debug info from nusoap client are as follows.
Code:

2019-02-15 03:03:12.172988 soap_transport_http: parsed URL scheme = http
2019-02-15 03:03:12.172994 soap_transport_http: parsed URL host = localhost
2019-02-15 03:03:12.172998 soap_transport_http: parsed URL path = url-here
2019-02-15 03:03:12.173007 soap_transport_http: set header Host: localhost
2019-02-15 03:03:12.173020 soap_transport_http: set header User-Agent: NuSOAP/0.9.5 (1.123)
2019-02-15 03:03:12.173029 soap_transport_http: set header Content-Type: text/xml; charset=ISO-8859-1
2019-02-15 03:03:12.173035 soap_transport_http: set header SOAPAction: ""
2019-02-15 03:03:12.173050 soap_transport_http: entered send() with data of length: 1334
2019-02-15 03:03:12.173073 soap_transport_http: connect connection_timeout 0, response_timeout 600, scheme http, host localhost, port 80
2019-02-15 03:03:12.173083 soap_transport_http: calling fsockopen with host localhost connection_timeout 0
2019-02-15 03:03:12.173281 soap_transport_http: set response timeout to 600
2019-02-15 03:03:12.173295 soap_transport_http: socket connected
2019-02-15 03:03:12.173309 soap_transport_http: set header Content-Length: 1334
2019-02-15 03:03:12.173316 soap_transport_http: HTTP request: POST url-here
2019-02-15 03:03:12.173322 soap_transport_http: HTTP header: Host: localhost
2019-02-15 03:03:12.173327 soap_transport_http: HTTP header: User-Agent: NuSOAP/0.9.5 (1.123)
2019-02-15 03:03:12.173332 soap_transport_http: HTTP header: Content-Type: text/xml; charset=ISO-8859-1
2019-02-15 03:03:12.173336 soap_transport_http: HTTP header: SOAPAction: ""
2019-02-15 03:03:12.173340 soap_transport_http: HTTP header: Content-Length: 1334
2019-02-15 03:03:12.175667 soap_transport_http: wrote data to socket, length = 1531
2019-02-15 03:03:12.405091 soap_transport_http: read line of 0 bytes:
2019-02-15 03:03:12.405126 soap_transport_http: socket read of headers timed out after length 0
2019-02-15 03:03:12.405134 soap_transport_http: read before timeout:
2019-02-15 03:03:12.405146 soap_transport_http: end of send()
2019-02-15 03:03:12.405225 nusoap_client: Error: HTTP Error: socket read of headers timed out


the post data with params.

Code:

   'requestHeaders' => false,
   'responseHeaders' => '',
   'responseHeader' => NULL,
   'document' => '',
   'endpoint' => 'url-here',
   'forceEndpoint' => '',
   'proxyhost' => false,
   'proxyport' => false,
   'proxyusername' => false,
   'proxypassword' => false,
   'portName' => '',
   'xml_encoding' => '',
   'http_encoding' => false,
   'timeout' => 0,
   'response_timeout' => 600,
   'endpointType' => 'soap',
   'persistentConnection' => false,
   'defaultRpcParams' => false,
   'request' => 'POST url-path-here HTTP/1.0
Host: localhost
User-Agent: NuSOAP/0.9.5 (1.123)
Content-Type: text/xml; charset=ISO-8859-1
SOAPAction: ""
Content-Length: 1334


the response that we get is.
Code:

 'response' => '',
   'responseData' => false,
   'cookies' =>
  array (
  ),
   'decode_utf8' => true,
   'operations' =>
  array (
  ),
   'curl_options' =>
  array (
  ),
   'bindingType' => '',
   'use_curl' => false,
   'fault' => false,
   'faultcode' => '',
   'faultstring' => '',
   'faultdetail' => NULL,
   'title' => 'NuSOAP',
   'version' => '0.9.5',
   'revision' => '$Revision: 1.123 $',
   'error_str' => 'HTTP Error: socket read of headers timed out',
   'debug_str' => '2019-02-15 03:03:12.172482 nusoap_client: ctor wsdl= timeout=0 response_timeout=600
endpoint=string(62) "url-here"


hope someone can identify the issue.
View user's profileFind all posts by gopinathSend private message
NuSoap - Socket read of headers timed out.
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic