Which parameter to set to fix Package too large error

For a huge insert operation (200k records) our ApplyUpdates() fails with exception “Package too large”

On the client side we already set this parameter
ROSynapseSuperHTTPChannel.MaxPackageSize:=1073741824;
but the error remains.

What parameter should be set (client side/server side) to fix this?

On a side note: Does RO/DA support BCP insert for speed purposes?

Regards,
Frederic

FYI:

I just tried adding

      var message = new RemObjects.SDK.BinMessage();
      message.MaxDecompressedMessageSize = Int32.MaxValue;
      message.MaxMessageSize = Int32.MaxValue;
      message.EnforceMaxMessageSize = false;
      internalROServer_.NetworkServer.RegisterServerMessage(message);

on the server side but this does not change anything

Hi,

this is SuperHTTP option.
so increase IpSuperHttpServerChannel.MaxPackageSize value, similar to client-side.


you can upload bcp’s output file to server-side and use bcp for inserting data.

Setting MaxPackageSize server side works.
Note: I initially set it to int.MaxValue but this made the RO service totally unavailable

Hi,

int.MaxValue breaks current logic:

        public override Int32 MaxPackageSize
        {
            get
            {
                return base.MaxPackageSize;
            }
            set
            {
                base.MaxPackageSize = value;
                this.Server.MaxPostSize = value + 1024; //<<<<<<<<<< negative value
            }
        }

Different error when sending large packages to tcp server.

We have a similar problem for TROIndyTCPChannel.
Here we do not get a nice error message, instead we get a socket exception.

Server side (.NET) we have IpTcpServerChannel (which does not have a MaxPackageSize
We set a max message size on the server side
image

Client side (delphi) we have TROBinMessage and TROIndyTCPChannel.

Can you tell me how to support large packages for the TCP channel?

Hi,

TCP channel itself has no limitations.

I’d recommend to not set max values.
try to retest, say with 1 gb ( 1 * 1024 * 1024 * 1024 = 1073741824 bytes ) or something similar.

What exactly do you suggest I change? The server side limitation?
This int.MaxValue has been in the code for a long time. Changing this does not solve the issue.

Can you deduce something from the callstack?
The ‘Connection reset by peer’ exception is not very explanatory.

Hi,

You are using TROIndyTCPChannel. this is wrapper for native TIdTCPClient class.
I can suggest to check sources of Indy for this error.

according to call stack, something is happened when data was sent inside TIdIOHandler.