RTC Forums

Subscription => Support => Topic started by: YuraZ on April 24, 2012, 05:12:39 PM



Title: Trying to send more Data out than specified in Header
Post by: YuraZ on April 24, 2012, 05:12:39 PM
Hello,
I'm using Delphi XE2 TRtcHttpServer, TRtcDataServerLink, TRtcServerModule, TRtcFunctionGroup and TRtcFunction for server, and TRtcHttpClient, TRtcClientModule, TRtcResult for client.
Settings for server:
TRtcHttpServer.FixupRequest.RemovePrefix := true;
TRtcHttpServer.MaxHeaderSize := 0;
TRtcHttpServer.MultiThreaded := true;
TRtcHttpServer.RestartOn.ListenError := true;
TRtcHttpServer.RestartOn.ListenLost := true;

TRtcServerModule.AutoSessionsLive := 600;
TRtcServerModule.DataFormats := [fmt_RTC];
TRtcServerModule.ModuleFileName := '/ITS';

Settings for client:
TRtcHttpClient.MultiThreaded := false;
TRtcHttpClient.Blocking := true;
TRtcHttpClient.ReconnectOn.ConnectError := true;
TRtcHttpClient.ReconnectOn.ConnectLost := true;
TRtcHttpClient.ReconnectOn.ConnectFail := true;

TRtcClientModule.AutoRepost := 2;
TRtcClientModule.AutoSessions := true;
TRtcClientModule.AutoSyncEvents := true;
TRtcClientModule.DataFormat := fmt_RTC;

Client is implemented in dll, which loading at another application. Each user connected through this application (with dll) at 10-20 (next may be 100) parallel theads. Each thread is creating new connection to server.
And sometimes (not often) i got error in client: "Trying to send more Data out than specified in Header".
Can anybody give me description for this error, because i not understand why its happened.
Thanks.

p.s.
Sorry for my English :)


Title: Re: Trying to send more Data out than specified in Header
Post by: D.Tkalcec (RTC) on April 24, 2012, 06:52:03 PM
That exception is raised if more data was being sent using the Write method, than specified in the ContentLength HTTP header. But since you are only using remote functions, where ContentLength is calculated automatically based on the actual content being sent, the error is more likey a result of corrupted memory. For example: bad use of pointers, incorrectly working Memory Manager, use of objects after their destruction, use of the same objects from multiple threads at the same time.

Best Regards,
Danijel Tkalcec


Title: Re: Trying to send more Data out than specified in Header
Post by: YuraZ on April 24, 2012, 09:12:58 PM
Thanks a lot, Danijel. I'm understanding you.