1. mike S
  2. PowerServer 2020 or older (Obsolete)
  3. Thursday, 24 March 2022 14:56 PM UTC

what is the timeout setting of the http client?  and is it different for powerbuilder vs powerserver (2020)?

windows api has 4 timeout setttings:

BOOL WinHttpSetTimeouts( int nResolveTimeout, int nConnectTimeout,  int nSendTimeout, int nReceiveTimeout );

what exactly is being set for the http client?

I tried setting the http timeout to 30 minutes and the result is that the http request returned an error almost immediately for any process more than 1 minute.  leaving it blank or 0 resulted in it working for any process less than 5 minutes. anything over 5 seems to just hang forever.  I can tell that the web api process does finish via 2 sets of logs, so there must be a timeout issue on http client.  

 

 

Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Monday, 28 March 2022 23:49 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Hi Mike,

 

Thanks for reporting this problem.

Currently, when you set the httpclient TimeOut to 30 seconds, it means that the actual C++ code calls the underlying WinHttpSetTimeouts API and passes in all four parameters with values of 30 seconds. This feature is invoked no differently in PowerBuilder vs PowerServer (2020).

Please refer to the related instruction on Windows Api. PB does not add any restrictions.

https://docs.microsoft.com/en-us/windows/win32/api/winhttp/nf-winhttp-winhttpsettimeouts 


And we did not reproduce the abnormal problem of setting timeout to 30 minutes you reported.

If you can reproduce it, kindly please report this issue to our ticket system:https://www.appeon.com/standardsupport/newbug so that it can be properly received and tracked. Please also provide a sample PB test case (with PBT / PBL) when you submit it to the ticket system.

 

Regards,

Mark Lee

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 24 March 2022 20:29 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 2

Here is the documentation for the WinHttp function:

https://docs.microsoft.com/en-us/windows/win32/api/winhttp/nf-winhttp-winhttpsettimeouts

I find the highlighted paragraph in the Remarks section interesting. If the HttpClient object is using WinHttpSetOption to set only ReceiveTimeout, it could cause problems if the number is lower than the default - 30 seconds.

HttpClient should have a SetTimeouts function that takes all four options. I'll add a enhancement request.

 

 

Comment
  1. Mark Lee @Appeon
  2. Monday, 28 March 2022 23:52 PM UTC
Hi Roland,



Thanks for your reporting it as a new enhancement request.

We've submitted this request to our product team for consideration.



Regards,

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.