[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] http_req Timeout When Service Shows Response



I was curious if anyone had an idea how this could occur?


Sent from Yahoo Mail for iPhone

On Thursday, May 10, 2018, 5:35 PM, Raymond Kanemeier <rkanemeier@xxxxxxxxx> wrote:

Sorry i had to hide the actual content of the json request so i modified it in the email.  so, indeed, the request length is 187 and so was the original jsin string. That being said, the 3rd party service received the request, successfully processed the request, and attempted to send the response, but we never received it before the timeout.  



Sent from Yahoo Mail for iPhone

On Thursday, May 10, 2018, 3:52 PM, Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:

Hi Ray,

The reason for the timeout is that the server doesn´t appear to be
sending you all of the data it promised.  You can see this in the log:

Content-Length: 187
{"field":"value"}

It is promising to send 187 characters, but the string it´s sending is
only 17, so HTTPAPI is waiting for the other 170 characters.  It will
wait until the server sends them, or until the timeout occurs.

'SK


On 5/10/2018 1:19 PM, Raymond Kanemeier wrote:
> We interface with a 3rd party software provider using restful http
> services (json body).  We implemented HTTPAPI to handle the restful
> calls with yajl to generate and parse json.  For the most part, this
> works perfectly.  However, we are encountering a lot of issues where
> the http_req will time out after "so many seconds" but the 3rd party
> service provider claims they sent a response back.  Here is a scenario:
>
> globalTimeout = 330;
>
> returnCode = http_setOption('timeout':%char(globalTimeout));
>
> httpApireturnCode = http_req( 'POST'
>                      : serviceUrl
>                      : *omit
>                      : globalJsonResponse
>                      : *omit
>                      : globalJsonRequest
>                      : 'application/json' );
>
> httpStatusMsg = http_error(httpApiErrorCode:httpStatus);
>
> if httpStatusMsg = HTTP_TIMEOUT_MSG;
>   // log timeout message in local log file
> endif;
>
>
> The 3rd party service provider showed us their logs for a specific
> request and their logs "seem" to show that they responded in 60
> seconds with an http status of 200 with a proper json body response. 
> I could post their log but it contains a lot of confidential
> information that would need to be stripped out before I could post
> it.  I'll be happy to do so if anyone needs to see it.  Here is the
> HTTPAPI log (ignoring the initial portion of the log showing ssl etc):
>
> POST /restful/services/path/service1 HTTP/1.1
> Host: thirdparty.restfulservices.com:443
> User-Agent: http-api/1.34
> Content-Type: application/json
> Content-Length: 187
> Authorization: XYz123
>
> senddoc(): entered
> {"field":"value"}
> recvresp(): entered
> etError() #43: CommSSL_Read:  timeout!
> recvresp(): end with timeout
> http_close(): entered
>
>
> Any clues on how to troubleshoot this with the 3rd party service provider?
>
>
>
> Raymond K

>
>

--
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi

-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi