Package too large... with something that it is NOT too large

Hello,

I’m using the latest official version. My RO Server is made with C++Builder XE5 and the Client is VS 2013 C#.

I have a simple service that returns a list of records from the database, as an array of a struct. The resultset is around 14,000 records. If I export to CSV the whole resultset is around 6MB, so it’s well below the default MaxPacketSize, and I already have upped it to 300MB. Doing quick math when finishing the service, it shows that the array is around 2.5MB. (count * sizeof)

I’m still getting the Package too large exception.

Any idea what could be? There are no Binary fields on the struct, nor anything like that. Just strings, and in this case, there are no big strings (maybe at most 50-60 characters)

Thanks

The exception happens on function TROBaseSuperChannelWorker.SendPackage, around line 998 of uROBaseSCHelpers.pas.

Apparently the GetOtherSideMaxPackageLen is returning 1MB, and the aData.Size is a little bit more. What I don’t see is why there is such low value, as in the client app I’m already setting the MaxDecompressedMessageSize to 512MB and the MaxMessageSize to 256MB. As far as I can see debugging the client app the values are those.

Is there another value that needs to be set?

Thanks.

I found a MaxPackageSize on the SuperTCP channel on .NET and set it to a bigger value and now it works. But I still don’t understand why it’s happening. This doesn’t happen on another app where I send, from time to time, much bigger files. Could it be that if the result doesn’t include Binary fields then it tries to send the whole thing on a single package?

Probably you sent some text data that had a good compression ratio

By default the super channels are limited to 1MB (Either way), to not overload the memory of the server; it asks the other side for the max package, so it fails if it’s too large. This can be changed with those properties.

Thanks EvgenyK & ck.

So, just to make things absolutely clear: there is no “repackaging” in smaller packages if a package is too big to send done automatically by the SDK?

I’m thinking that in the other software I have, where I’m sending some big files, I’m using a “simple” tcp transport, not the SuperTCP. There are no restrictions on those transports?

Regards

Hello

No, there is no auto-repackaging. Also there are no such check on simple-… channels. However if you are sending big files over the network it would be good to split them into chunks (there is a sample for this approach shipped with the RemObjects SDK)

Regards