#1 2013-11-26 07:47:51

nirnir
Member
Registered: 2013-11-11
Posts: 66

connection dropped by the client

I noticed that in interface calls if the call takes longer then 30 seconds it is droped by the client .
Where can I configure this timeout .

I tried to increase keepAlive but it doesn't help .

I created that service to check it

  ITests  = interface(IInvokable)
     ['{0214C711-E14B-4D86-B418-B48553EDA24C}']
    function test_wait(p_mili:integer):integer;
  end;


  TTests = class(TInterfacedObject, ITests)
   public
     function test_wait(p_mili: integer): integer;
    end;

function TTests.test_wait(p_mili: integer): integer;
var
  speedTester:TspeedTester;
begin
  speedTester.start;
   my_sleep(p_mili);
  result := speedTester.elapsed;
 end;




type
  TspeedTester = record
  private
    startTime: int64;
  public
    procedure start;
    function elapsed: int64;
    function elapsedSTR: string;
  end;

implementation

{ TspeedTester }

function TspeedTester.elapsed: int64;
begin
  result := GetTickCount - startTime;
end;

function TspeedTester.elapsedSTR: string;
begin
  result := inttostr(elapsed);
end;

procedure TspeedTester.start;
begin
  startTime := GetTickCount;
end;

Offline

#2 2013-11-26 08:08:03

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: connection dropped by the client

Is it broken on the server side or the client side?

On the server side, you should not have a method taking so much time.
You may better use a dedicated thread for the process, and make the method asynchronous.

AFAIR there are some timeout properties at client side.

Offline

#3 2013-11-26 11:01:43

nirnir
Member
Registered: 2013-11-11
Posts: 66

Re: connection dropped by the client

This is broken on the client side
it isn't  in the main thread and used for uploading/downloading data in the background .
What's the property name on the client for request timeout

Offline

#4 2013-11-27 00:05:28

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: connection dropped by the client

You have access to the underlying HTTP connection via the WinAPI property.

So you can set e.g. WinAPI.ReceiveTimeout

Offline

Board footer

Powered by FluxBB