comm_blockread failed! / large jsonfile

Discussions related to HTTPAPI (An HTTP Client Package for RPG programming.) http://www.scottklement.com/httpapi/
Post Reply
AS400Guy
Posts: 8
Joined: Mon Sep 25, 2023 10:14 am
Location: Rotterdam, The Netherlands

comm_blockread failed! / large jsonfile

Post by AS400Guy »

Hello,
I've a problem with a large jsonfile.
It is chunked in different blocks, but it looks like the last block crashes.
I got an error: 'comm_blockread failed!'.

See below the relevant part of the log:
chunk size = 8192
get_chunk_size returned 8192
calling comm_blockread

{"Orders":[...,"uomDescription":"Piece",
comm_blockread returned 8192

get_chunk_size(): entered
2000

chunk size = 8192
get_chunk_size returned 8192
calling comm_blockread
"status":"S03",...,"statusText":"Shipped"}]}
comm_blockread returned 8192


get_chunk_size(): entered
2000

chunk size = 8192
get_chunk_size returned 8192
calling comm_blockread
},{"orderId":"58446",...,{"material":"000
comm_blockread returned 8192


get_chunk_size(): entered
2000

chunk size = 8192
get_chunk_size returned 8192
calling comm_blockread
170",...,{"material":"000069","description":"Aphid
comm_blockread failed!
http_close(): entered
Does anyony has an idea how to solve this?

Kind regards,
AS400Guy
Scott Klement
Site Admin
Posts: 872
Joined: Sun Jul 04, 2021 5:12 am

Re: comm_blockread failed! / large jsonfile

Post by Scott Klement »

The server is saying that it is sending 8192 bytes (hex 2000) of data to you. It is disconnecting after sending only 50 bytes. This doesn't appear to be a problem in HTTPAPI. Either the network is getting disconnected, or the server program is ending before all of the data is properly sent.
AS400Guy
Posts: 8
Joined: Mon Sep 25, 2023 10:14 am
Location: Rotterdam, The Netherlands

Re: comm_blockread failed! / large jsonfile

Post by AS400Guy »

Hi Scott,
A very strange situation.
Today it's working. I didn't change anything at my side...
Scott Klement
Site Admin
Posts: 872
Joined: Sun Jul 04, 2021 5:12 am

Re: comm_blockread failed! / large jsonfile

Post by Scott Klement »

Not really strange at all.
Post Reply