I copied your sample flow and changed the curl exec node to spawn mode and it produced a ton of small fragments:
6/1/2019, 12:25:31 PMnode: 1d2369dd.ca5906
msg.payload : buffer[4096]
[ 255, 216, 255, 224, 0, 16, 74, 70, 73, 70 … ]
6/1/2019, 12:25:32 PMnode: 1d2369dd.ca5906
msg.payload : buffer[12288]
[ 59, 221, 251, 141, 64, 99, 104, 13, 13, 14 … ]
6/1/2019, 12:25:32 PMnode: 1d2369dd.ca5906
msg.payload : buffer[4096]
[ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32 … ]
6/1/2019, 12:25:32 PMnode: 1d2369dd.ca5906
msg.payload : buffer[8192]
[ 189, 212, 231, 146, 226, 194, 199, 252, 71, 211 … ]
6/1/2019, 12:25:32 PMnode: 1d2369dd.ca5906
msg.payload : buffer[4096]
[ 239, 127, 91, 123, 96, 198, 41, 142, 174, 24 … ]
6/1/2019, 12:25:32 PMnode: 1d2369dd.ca5906
msg.payload : buffer[4096]
[ 7, 212, 139, 253, 7, 23, 255, 0, 27, 123 … ]
6/1/2019, 12:25:32 PMnode: 1d2369dd.ca5906
msg.payload : buffer[12288]
[ 247, 174, 189, 215, 29, 67, 250, 143, 246, 254 … ]
6/1/2019, 12:25:32 PMnode: 1d2369dd.ca5906
msg.payload : buffer[4096]
[ 122, 100, 200, 72, 234, 100, 116, 138, 63, 87 … ]
6/1/2019, 12:25:32 PMnode: 1d2369dd.ca5906
msg.payload : buffer[8192]
[ 143, 186, 132, 52, 249, 244, 229, 122, 205, 27 … ]
6/1/2019, 12:25:32 PMnode: 1d2369dd.ca5906
msg.payload : buffer[28672]
[ 167, 167, 95, 255, 208, 213, 191, 54, 177, 211 … ]
6/1/2019, 12:25:32 PMnode: 1d2369dd.ca5906
msg.payload : buffer[16384]
[ 250, 173, 199, 212, 158, 64, 39, 158, 125, 182 … ]
6/1/2019, 12:25:32 PMnode: 1d2369dd.ca5906
msg.payload : buffer[16384]
[ 177, 63, 241, 30, 235, 199, 175, 80, 158, 160 … ]
6/1/2019, 12:25:32 PMnode: 1d2369dd.ca5906
msg.payload : buffer[8192]
Eventually there were some 64K chunks but none larger.
Putting it back to "normal" useSpawn:false behaves like you expect and describe.
6/1/2019, 12:29:51 PMnode: 1d2369dd.ca5906
msg.payload : buffer[1755436]
[ 255, 216, 255, 224, 0, 16, 74, 70, 73, 70 … ]
Only one complete image is sent, when the curl command completes. Since ffmeg "never completes" until we stop it, spawn mode is essential.
I think this 64K highwatermark limit on Linux that dceejay has mentioned explains my results completely. Question then becomes how can we increase this limit?