From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to change HTTP POST Buffer size?

Hi all,

I am trying to download data with esimate size of ~100 MB with HTTP POST at one query.

For some reason I am getting error 363510, I am suspecting that it is related to the default buffer size of the HTTP POST function.

So, Is it possible to change HTTP POST Buffer size?

Are there any other reasons for getting this error code while using the HTTP POST? I've set the timeout to 2 minutes so this is not the cause.

Thanks,

Gil

 

0 Kudos
Message 1 of 9
(6,975 Views)

There are a number of factors that can come into play here:

 

1) As the size of the data is quite large, it will take a fair amount of time to upload 100MB of data. On the client side, LV has a timeout and I think it will close the connection after 2 minutes.

2) The server probably has a timeout on POST data / script execution time.

3) Many servers have a limit set on the size of the POST data and/or any uploaded files sent to the server

 

As the amount of data is quite large, you might benefit from using a more reliable upload method or breaking the data down into small pieces before sending it. This reduces the risk of losing data in case you have a temporary connection glitch (it's pretty frustrating downloading a large file, only to have a connection problem at 95%!).

 

2 and 3, you need to check the settings on the server you are POSTing to. For 1, try uploading it from your computer to get an idea of how long it takes and set your timeout accordingly.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 9
(6,944 Views)

Hi Sam,

Thank you very much for your response!

The situation I described is only when downloading from the server (I am not uploading large amount of data).

The size gets big since I am downloading multiple rows of the same item (uploaded as small chunks of data- one row on each upload).

When downloading I have only one option and that's to get all the uploaded data for that item (all rows in the DB at once). And I can get it only in single operation (so without changing the DB management SW code, dividing to small units is impossible).

 

So I will check option 2,3. But if that fails or impossible to change or not the cause of the problem, is it possible that changing the HTTP Buffer in labVIEW size can solve the problem, is that even possible in LabVIEW?

 

Thanks,

Gil

0 Kudos
Message 3 of 9
(6,930 Views)

It's not possible to change the buffer size but I do not know of any limitations in terms of size of data received. What is the error message that comes along with the error code?

 

You could consider implementing your own HTTP POST VI using the TCP VIs - open a connection on Port 80, send the initial HTTP line, some headers, a couple of line breaks, write your POST data and then use the TCP read function to keep reading until you have all of the data.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 9
(6,913 Views)

Hi,

I am getting error:363510

Thanks,

Gil

0 Kudos
Message 5 of 9
(6,897 Views)

@Sam_Sharp wrote:

What is the error message that comes along with the error code?


 The error message sometimes includes a more descriptive message along with the general description for each error code.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 6 of 9
(6,885 Views)

The error message is:

Error 363510 occurred at LabVIEWHTTPClient.lvlib:POSTBuffer.vi:6120001

Possible reason(s):

LabVIEW: An error occurred while writing to the socket.

 

Any idea?

BTW increasing timeout from both sides (mine and the server side didn't help)

Thanks!

0 Kudos
Message 7 of 9
(6,864 Views)

Hello Gilgil

 

I am wondering if you tried to use -1 in the timeout input just to see if that works.

 

Regards 

0 Kudos
Message 8 of 9
(6,836 Views)

I don't think it is buffer size issue yet, i am trying to send "&imei=353713115444367&sim_number=89462008006000106166" and i get same error and this in not big. maybe there has been an update of the encryption protocols on the server you try to upload to.

0 Kudos
Message 9 of 9
(2,955 Views)