1. Roland Smith
  2. PowerBuilder
  3. Sunday, 24 July 2022 03:39 AM UTC

I've started using HttpClient in place of my API based WinHttp object.

One test used SendRequest to send a string that was 138,000 bytes and it just hangs.

I checked the help and it says that there is a limit of about 20 MB. The limit appears to be much lower in my testing.

Now I am trying PostData. The help example has the string being broken up into 1024 chunks and passed to PostData in a loop.

For my first try I sent the whole string with a single call to PostData and it worked.

My questions are:

Is there a maximum size for PostData?

When chunking data, what is the best size speed-wise?

Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Monday, 25 July 2022 08:13 AM UTC
  2. PowerBuilder
  3. # 1

Hi Roland,

  1. The maximum data of sendrequest is related to your server settings and is not related to the PostData method itself.

You can refer to the following link for the detail.

https://www.appeon.com/developers/get-help/knowledgebase/how-change-maximum-url-length-supported-web-request-sent-httpclientrestclient.html

  1. When chunking data, what is the best size speed-wise?

Answer: Based on our current test results, The best size speed-wise is multiples of 8K. We found in our test that some machine works better with 16K and some machine works better with 8K. We didn't find the best size speed-wise.  

 

Regards,

 

 

Comment
  1. Mark Lee @Appeon
  2. Wednesday, 27 July 2022 05:17 AM UTC
Hi Roland,

Sorry for the wrong link.

Currently, It is not recommended to use the HTTPClient object to process large data (20 MB or 100,000 data rows can be considered as large data based on our tests), because this object will call a third-party library which is memory intensive.



And yes, if you need to handle large-size data, using PostData is better than SendRequest.

  1. Helpful 1
  1. Miguel Leeuwe
  2. Wednesday, 27 July 2022 07:54 AM UTC
Hi Mark,

So ... what do you recommend for data larger than 20MB ?
  1. Helpful
  1. Roland Smith
  2. Wednesday, 27 July 2022 12:56 PM UTC
PostDataStart, PostData (in a loop), PostDataEnd.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Sunday, 24 July 2022 07:40 AM UTC
  2. PowerBuilder
  3. # 2

Hi,

Not an answer to the question, but wouldn't it be easier / faster to send a Blob? The question would still remain the same: what's the maximum length.

regards.

Comment
  1. Miguel Leeuwe
  2. Sunday, 24 July 2022 07:43 AM UTC
  1. Helpful
  1. Roland Smith
  2. Monday, 25 July 2022 02:03 AM UTC
The data starts as a string so blob would be an extra step. My WinHTTP code uses 8 KB chunks so I'll start with that. The vast majority of the data transfers are under 1 KB so this is an edge case anyway.
  1. Helpful
  1. Mark Lee @Appeon
  2. Monday, 25 July 2022 08:17 AM UTC
Hi Roland,



Did you encounter the same issue on other client machines or Server API?

  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.