Jump to content

aristeo

Members
  • Posts

    145
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by aristeo

    • Hello randomly our isapi hyperserver restarts once a day when there are active sessions, and the log that is recorded is this. How could we solve this?
       

      caicontaweb.dll: 00001688: 17:47:33 []:>--------------------------------------------------------------<
      caicontaweb.dll: 00001688: 17:47:33 []:Starting Server. Module Handle: 0000000000400000
      caicontaweb.dll: 00001688: 17:47:33 [TUniServerModule]:Server First Init.
      caicontaweb.dll: 00001688: 17:47:33 [TUniServerModule]:Start Path = C:\inetpub\wwwroot\caicontaweb\WebApp\
      caicontaweb.dll: 00001688: 17:47:33 [TUniHyperServer]:InitInterceptor
      caicontaweb.dll: 00001688: 17:47:33 []:Transport.PoolSize: 750
      caicontaweb.dll: 00001688: 17:47:33 [TUniHyperNodeManager]:Orphaned Node #7 found.
      caicontaweb.dll: 00001688: 17:47:33 [TUniHyperNodeManager]:Orphaned Node #5 found.
      caicontaweb.dll: 00001688: 17:47:33 [TUniHyperNodeManager]:Orphaned Node #0 found.
      caicontaweb.dll: 00001688: 17:47:33 [TUniHyperNodeManager]:Orphaned Node #3 found.
      caicontaweb.dll: 00001688: 17:47:33 [TUniHyperNodeManager]:Orphaned Node #2 found.
      caicontaweb.dll: 00001688: 17:47:33 [TUniHyperNodeManager]:Orphaned Node #1 found.
      caicontaweb.dll: 00001688: 17:47:33 [TUniHyperNodeManager]:Orphaned Node #6 found.
      caicontaweb.dll: 00001688: 17:47:33 [TUniHyperNodeManager]:Orphaned Node #4 found.
      caicontaweb.dll: 00001688: 17:47:33 []:Server Started. Module Handle: 0000000000400000
      caicontaweb.dll: 00001468: 17:48:04 [HttpExtensionProc[172.71.134.186]]:EUniHyperServerException : TUniHyperServer.HandleHTTPRequest(), Node:[1], EIdReadTimeout, Read timed out. : Addr: $05FC8D45
      caicontaweb.dll: 00000B54: 17:48:07 [HttpExtensionProc[172.71.134.186]]:EUniHyperServerException : TUniHyperServer.HandleHTTPRequest(), Node:[1], EIdReadTimeout, Read timed out. : Addr: $05FC8D45
      caicontaweb.dll: 00000914: 17:48:14 []:Terminating ISAPI Server. Module Handle: 0000000005C40000
      caicontaweb.dll: 00000914: 17:48:14 [TUniServerModule]:Shutting Down Server.
      caicontaweb.dll: 00000914: 17:48:14 [TUniHyperServer]:Terminating...
      caicontaweb.dll: 00000914: 17:48:14 [TUniHyperNodeManager]:Terminating...

       

  1. The websocket is created in the OnCreate of MainForm. With a code like this

     

            UniSession.AddJS(ReadString(Size) + #13 + 'socket=new sgcWebSocket(''ws'
              + Copy(UniServerModule.ServidorWebSocket, 5,
              Length(UniServerModule.ServidorWebSocket) - 4) + '/sgc/auth/session/'
              + Token + ''');' + #13 +
              'socket.on(''open'', function(event) { ajaxRequest(' + Name +'.form,''Open'', []);});' + #13 +
              'socket.on(''close'', function(event) { ajaxRequest(' + Name +'.form,''Closed'', [event.message]); });' + #13 +
              'socket.on(''error'', function(event) { ajaxRequest(' + Name +'.form,''Error'', [event.message]); });' + #13 +
              'socket.on(''message'', function(event) { ajaxRequest(' + Name +'.form,''Message'', [event.message]); });');

    when the websocket client receives a message send an ajaxRequest to the MainForm with the Message "Message". So simply, i capture the message on the OnAjaxEvent of MainForm.

  2. The OnSessionTimeOut has a code like this

     

    procedure TUniMainModule.UniGUIMainModuleSessionTimeout(ASession: TObject;
      var ExtendTimeOut: Integer);
    begin
      if /*Connected to WebSocket*/ then
      begin
        ExtendTimeOut:=UniServerModule.SessionTimeout;
        /*This instruction is to send a GET to a REST service, for the websocket server sends a #TIMEOUT# message to the browser to open a window with CountDown*/
        /*TUniMainModule(TUniGUISession(ASession).UniMainModule).GUID stores the GUID of the websocket client in the browser of the user*/
        EnviarMensajeServidor(TUniMainModule(TUniGUISession(ASession).UniMainModule).GUID,'#TIMEOUT#')
      end;
    end;

     

  3. With the version 1.90.0.1536 (in previous same problem happens)

    I get a screenshot in a moment and other screenshot 9 hours later,. The active sessions are the same, with the Last Event and Event Source the same.  This is the error. The situation is not posible. The sessions remains active in the server, when the user have closed his session.

    1.jpg

    2.jpg

  4. I have a problem with my HyperServer, It's not closing all sessions, when these are finished.

    So I'm trying to figure it out differently ...
    With a UniThreadTimer in the Servermodule with an interval of 1 minute. I have a code like the following:

    procedure TUniServerModule.UniThreadTimer1Timer(Sender: TObject);
    var
      i:Integer;
      Sesion:TUniGUISession;
    begin
      UniServerModule.SessionManager.Sessions.Lock;
      try
        for i:=UniServerModule.SessionManager.Sessions.SessionList.Count-1 downto 0 do
        begin
          Sesion:=UniServerModule.SessionManager.Sessions.SessionList[i];
          if (MinutesBetween(Now,Sesion.LastTimeStamp)>(SessionTimeout div 1000 div 60)+5) then
          begin
            sesion.ReleaseSession;
            Sesion.Terminate('Ha superado el tiempo de inactividad. Se cerró la sesión');
          end;
        end;
      finally
        UniServerModule.SessionManager.Sessions.UnLock;
      end;
    end;

    it goes through all the sessions and the one that since its LastTimeStamp has passed (SessionTimeOut div 1000 div 60) +5 (5 tolerance) minutes. I'm trying to log out.
    With this solution, there are still open sessions. Could anybody suggest a solution. ?

  5. In our Hyperserver, a node is created when a new session starts (ScreenShot attached). With this hypersever.cfg i don't know why. I think, one node for all sessions is the correct.

    [transport]
    pool_size=0
    command_timeout=20000
    request_timeout=300000
    connect_timeout=20000

    [http_transport]
    start_port=20000

    [hyper_server]
    binary_name=portalsii.dll
    initial_nodes=2
    max_nodes=8
    max_sessions=0
    sessions_per_nodes=0
    prompt_login=1
    persistent_node_zero=0
    port=8077
    url_path=
    url_referer=
    ext_root=C:\inetpub\Sitios\portalSII\WebApp\files\js\1.50.0.1483\ext
    uni_mobile_root=[unim]\
    uni_root=C:\inetpub\Sitios\portalSII\WebApp\files\js\1.50.0.1483\uni
    uni_packages_root=[unipack]\
    max_requests=500
    antiflood_per_ip=0

    [node_recycling]
    enabled=1
    recycle_after_secs=3600
    recycle_after_sessions=0
    recycle_after_idle_secs=300
    recycle_when_empty=1

    Thanks

    ScreenShot.jpg

×
×
  • Create New...