aristeo
-
Posts
145 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
Events
Posts posted by aristeo
-
-
We are making periodic requests from outside to verify that a web application is ok. For this we have an endpoint implemented in the OnHTTPCommand event. Is it possible to somehow make that request to the persistentNode? What would the URL be? Thanks
-
In the TUniURLFrame, something like this:
ajaxRequest(MainForm.form,'event',[]):
Where MainForm is the application's MainForm
-
Hello... is there any way to generate an ajaxRequest in a TUniUrlFrame or TUniHtmlFrame, to the application's mainForm?. Thank You:
-
No... This was the problem. Thanks
-
Is there any way to set the left position with a negative value? If I set the left property to -100, the window always is rendering with a left 0. Thanks.
-
ok... thanks Farshad... ExtendTimeOut was de problem. It makes that randomly the sessions stay blocked.
-
Ok.... I haven't saw that sample. I will implement this, like Session Idle TimeOut and I will inform about the resul. Thanks.
- 1
-
yes... but i think that i need extend timeout to show the countdown window.
When the 5 minutes windows countdown arrives 0, the session is terminated.
-
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.
-
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;
-
15 minutes + 5 minutes.
SessionTimeOut is 15 minutes, but when time is out, the server (with websocket) opens a window in the browser with a 5 minutes countdown for closing session with a button to cancel it
-
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.
-
We have same issue... Some sessions are blocked and remain open by Hyperserver.
The sessions remains the connection to a firebird Server active, increasing the memory without free It, because the sessions don't close. It's a big problem for us
-
The soWipeShadowSessions is explained here....
-
Could anybody explain me for what are the soWipeShadowSessions and soTerminateOnSession options? Thanks
-
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. ? -
Websockets are the solution
-
-
Use websockets . I use thia component https://www.esegece.com/
-
Use websockets . I use thia component https://www.esegece.com/ for sending messages from server to clients
-
Randomly, in hyperserver we obtain the error: "[SendCommand Error, Node: 2]:Socket Error # 10061 Connection refused" that is logged in the log file of Hyperserver dll. Could anybody help with this? Thanks.
-
Ok, thanks
-
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=1Thanks
-
You're right, the problem is this line in the source of the project:
ShellExecute(GetDesktopWindow,'open', PChar('http://127.0.0.1:8077'), '', '',SW_MAXIMIZE);
to open the browser automatically when running debugging
Problem with orphaned nodes in hyperserver
in General
Posted
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...
Compartido con