Skip to main content
1-Visitor
September 21, 2016
Question

Max FileTransfer block size and "Timed out APIRequestMessage" error

  • September 21, 2016
  • 6 replies
  • 3747 views

I am playing around with the file transfer setting on the remote thing client. I'm seeing slow file transfer so I tried increasing the block size. But when I increase the block size over 32k the transfer starts timing out with message "Timed out APIRequestMessage". I am using SendFile in the .net SDK.

I'm wondering if there are some other setting I'm missing, anyone have insight into this?

Thanks,

Daniel

6 replies

5-Regular Member
September 26, 2016

Daniel, what's the Max FileTransfer block size set on the FileTransfer Subsystem in the Platform?

1-Visitor
September 26, 2016

It's was at the default 128k, I tried upping it to 1000k but no change.

5-Regular Member
September 26, 2016

I believe there was an issue with file transfers when the file size exceeded the block size causing it to time out. What version of the SDK are you using?

Please do note that increasing the block size might impact performance as well.

1-Visitor
September 26, 2016

File size is huge so it's always going to be larger than block size in my case, that seems counter intuitive?

We're on version 5.6.1.1100

1-Visitor
January 27, 2017

Did you find a solution to this?

Using the .NET SDK the default block size was 8000 bytes, so my 400MB download to the asset took 90 min.  I tried increasing the block size, but you cannot do it directly, so I had to shutdown and reinitialize the FTManager, my download shows up for a few seconds, never seeming to transfer any blocks, then disappears. I thought my 10 second timeout on GetFile was too short for larger block sizes, so I increased it to 100 seconds, but still around 10 seconds or so, the active transfer disappears from the FT Subsystem and I have no idea why, no exception is being thrown.

ShutdownFileTransferManager();

InitializeFileTransferManager(new FileTransferInfo { BlockSize = 128000 });

Ideas?

16-Pearl
November 27, 2017

You can set the FileTransferInfo in the config. I found it also just by accident:

e.g.

config.FileTransferInfo = new FileTransferInfo { BlockSize = (uint)Math.Pow(2, 15), StagingDir = System.IO.Directory.GetCurrentDirectory() + "/staging", Timeout = 60000, MaxFileSize = 1024000000, MD5BlockSize = (ushort)6400 };

But you have to fiddle around with the BlockSize. I found out that the java sdk uses blockSize 65536 (2^16). But if you set it too high you will get Timeouts (Timed out APIRequestMessage). Not sure why. Locally it is working with 2^15 - ^16 will timeout.