jmonty77 Posted May 4, 2021 Share Posted May 4, 2021 I've a simple page with a single unitimer. When I stop server, I get POST https://localhost/invalidsession.dll/HandleEvent net::ERR_CONNECTION_REFUSED every few seconds in console. It's ok. But when I start server again, the page is loaded again for every post that failed. I can see it with a console.log in invalidsession template: <html> <body bgcolor="#dfe8f6"> <script> console.log('load'); </script> <p style="text-align:center;color:#0000A0">[###message###]</p> <p style="text-align:center;color:#A05050"><a href="[###url###]">Restart application</a></p> </body> </html> If the server is stopped some minutes, hundred invalidsession are fired after starting it. How to stop it at first invalid session? Thanks! Jordi Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted May 4, 2021 Share Posted May 4, 2021 5 hours ago, jmonty77 said: I've a simple page with a single unitimer. When I stop server, I get POST https://localhost/invalidsession.dll/HandleEvent net::ERR_CONNECTION_REFUSED every few seconds in console. It's ok. But when I start server again, the page is loaded again for every post that failed. I can see it with a console.log in invalidsession template: <html> <body bgcolor="#dfe8f6"> <script> console.log('load'); </script> <p style="text-align:center;color:#0000A0">[###message###]</p> <p style="text-align:center;color:#A05050"><a href="[###url###]">Restart application</a></p> </body> </html> If the server is stopped some minutes, hundred invalidsession are fired after starting it. How to stop it at first invalid session? Thanks! Jordi Hello As you have ConnectionFailureRecovery, system will try to send unanswered requests again. You can set UniServerModule.ConnectionFailureRecovery.Enabled Quote Link to comment Share on other sites More sharing options...
jmonty77 Posted May 4, 2021 Author Share Posted May 4, 2021 Hello, I want to have connectionfailurerecovery enabled. But after loading first invalidsessiontemplate, why the system continues trying to do post? If the server hangs, and if I have hundreds of clients, after starting it again some time later, it will receive hundred or thousands of queued post. Is there a way of stopping next requests after loading first invalidsessiontemplate page? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted May 4, 2021 Share Posted May 4, 2021 1 hour ago, jmonty77 said: Hello, I want to have connectionfailurerecovery enabled. But after loading first invalidsessiontemplate, why the system continues trying to do post? If the server hangs, and if I have hundreds of clients, after starting it again some time later, it will receive hundred or thousands of queued post. Is there a way of stopping next requests after loading first invalidsessiontemplate page? Hi Can you make a test case? Quote Link to comment Share on other sites More sharing options...
jmonty77 Posted May 5, 2021 Author Share Posted May 5, 2021 Hello, create new project and put unilabel and unitimer. In unitimertimer: procedure TMainForm.UniTimer1Timer(Sender: TObject); begin unilabel1.Caption:='a'; end; In servermessages.invalidsessionmessagetemplate: <html> <body bgcolor="#dfe8f6"> <script> console.log('load event'); </script> <p style="text-align:center;color:#0000A0">[###message###]</p> <p style="text-align:center;color:#A05050"><a href="[###url###]">Restart application</a></p> </body> </html> Stop the server for some seconds to see some POST error messages in javascript console. Start server again and you will see lot of "load event" messages in javascript console. I think that "Restart application" page would have to be loaded only once. (I'm using ISAPI module) Quote Link to comment Share on other sites More sharing options...
jmonty77 Posted July 15, 2021 Author Share Posted July 15, 2021 This behaviour is still present in current release. Is there a way to solve or minimize it? Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.