1. Roland Smith
  2. PowerBuilder
  3. Monday, 15 May 2023 15:36 PM UTC

My customer is having an issue with HttpClient Timeout. PB 2019-R3 I think.

He set Timeout to an hour because some web services he is calling take a long time. If the web service aborts, the client continues until the timeout has expired before presenting an error message.

He is using PostDataStart, PostData, PostDataEnd to run the web service.

Does this sound like normal behavior? Should we code anything differently? Is it a PB bug?

Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Monday, 22 May 2023 07:24 AM UTC
  2. PowerBuilder
  3. # 1

Hi Roland,

This is normal behavior. HTTPClient request will wait for response from the Server end. If the web service aborts, HTTPClient request doesn’t get a response from the Server end, it returns after it times out. I suggest you set a smaller timeout value to avoid this problem.

If the web service takes a long time to transfer data, I suggest you split the data and use postdata in loop to use multiple requests to transfer them to avoid timeout.

If the web service has complicated internal logic and takes a lot of time, I suggest you move the logic to external function to process and only use web service to receive data.

Regards,
Kai

Comment
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.