Page 1 of 1

comm_blockread failed! / large jsonfile

Posted: Tue Jul 09, 2024 10:14 am
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

Re: comm_blockread failed! / large jsonfile

Posted: Tue Jul 09, 2024 8:31 pm
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.

Re: comm_blockread failed! / large jsonfile

Posted: Wed Jul 10, 2024 9:56 am
by AS400Guy
Hi Scott,
A very strange situation.
Today it's working. I didn't change anything at my side...

Re: comm_blockread failed! / large jsonfile

Posted: Wed Jul 10, 2024 12:09 pm
by Scott Klement
Not really strange at all.