NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Mark Sarson on August 23, 2024, 12:21:22 AM
-
Good Morning All.
I have a NT webserver (Multi DLL) that is very slow at closing down either when started as a service or on the desktop.
It is taking ~ 20 seconds to close, as can be seen in the debug output.
19 04:10:26.099 89528 IBSServer.exe [NetDLL] [1] SimpleCloseSocket() : p_lpSSL_CTX start
20 04:10:26.099 89528 IBSServer.exe [NetDLL] [1] SSL_Our_Close() : Before CTX Free 27202432 CTX#=0
21 04:10:26.099 89528 IBSServer.exe [NetDLL] [1] SSL_Our_Close() : After SSL_CTX+Free
22 04:10:26.099 89528 IBSServer.exe [NetDLL] [1] SimpleCloseSocket() : p_lpSSL_CTX end
23 04:10:26.224 89528 IBSServer.exe [NetDLL] [2] CallBackWindowSrc() : NTThread Event : 523 start
24 04:10:46.748 89528 IBSServer.exe [NetDLL] [1] SimpleCloseSocket() : p_lpSSL_CTX start
25 04:10:46.748 89528 IBSServer.exe [NetDLL] [1] SSL_Our_Close() : Before CTX Free 27373032 CTX#=0
26 04:10:46.748 89528 IBSServer.exe [NetDLL] [1] SSL_Our_Close() : After SSL_CTX+Free
27 04:10:46.748 89528 IBSServer.exe [NetDLL] [1] SimpleCloseSocket() : p_lpSSL_CTX end
28 04:10:46.748 89528 IBSServer.exe [NetDLL] [1] SimpleCloseSocket() : Error 10038 Ignored.
29 04:10:46.748 89528 IBSServer.exe [NetDLL] [1] SimpleCloseSocket() : p_lpSSL_CTX start
30 04:10:46.748 89528 IBSServer.exe [NetDLL] [1] SSL_Our_Close() : Before CTX Free 125743376 CTX#=0
Is this expected behaviour or am I able to debug more to work through the issue.
Thanks
Mark
-
Depends if you are using Graceful Close.
If so the server writes the session data to a JSON file.
When you relaunch the server it reads the JSON file so will take time depending on how much data is in the JSON file.
More servers and more sessions the longer the delay.
I always leave the existing server open and start a new server after deleting the JSON file.
This server will error because the current running server has the listening ports open.
After I close the current running server the new server will connect to the listening ports.
Of course I do loose all the existing session but that is perfect for me.
-
Hi Vinnie,
Thank you for the reply :)
In the Debug output I posted, this was just by pressing the close button after a minute of running the server.
For information here, on my development VM, the server closes instantly. Not the same on the deployed server.
Mark
-
OK nothing to do with what I said.
Maybe a thread is still running.
Maybe check Performance Tab and check threads before you press the close.
-
Vinnie is on the right track here, but there are few details wrong;
If "Save state between runs" is set then all the session data is saved to a state file on close.
This can take time depending o how much there is.
(the file is XML not json).
This is unrelated to graceful close.
Even if the server has only run for a short time there can be a lot of state information, if the state was loaded on startup. So check the size of your state file.
Graceful close completes all active threads before terminating the program. As distinct from a hard close which simply terminates all threads wherever they happen to be.
Bruce
-
Interesting.
Thanks Bruce.
NetTalk 14 my file is host.state.json
Maybe I have set something.
-
You're right Vinnie!
The state is now stored as JSON - that changed from XML at some point.
Settings are still XML, but that's a different file.
cheers
Bruce