NetTalk Central

Author Topic: NT apps not closing from Webserver  (Read 3892 times)

Richard I

  • Sr. Member
  • ****
  • Posts: 383
    • View Profile
    • Email
NT apps not closing from Webserver
« on: June 26, 2018, 12:10:57 AM »
Hi,
 Im finding that my NT apps  are not closing following the selection of "Close" on the Webserver.
I have to go into task manager to close them.

Bruce also had this problem in a  recent webinar but did not, if I recall,  suggest a solution...
Is there one ?
Thanks
Richard NT 8.71 ( still)

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: NT apps not closing from Webserver
« Reply #1 on: June 26, 2018, 12:40:39 AM »
Hi Richard,

If you have threads still running when the main thread closes then the app will remain in memory, until the thread completes (and usually at that point GPF's).

The easiest "fix" for this is the Graceful Button control template which you can add to the WebServer procedure. This stops new requests, but waits until active threads have closed before closing the main server.

Of course if you have "endless threads" in your app then the server will never close. But that's a bug you should investigate and fix.

cheers
Bruce


Richard I

  • Sr. Member
  • ****
  • Posts: 383
    • View Profile
    • Email
Re: NT apps not closing from Webserver
« Reply #2 on: June 27, 2018, 01:56:18 AM »
Thanks Bruce.

The CleanCloseDown global extension with
CleanCloseDown() on  the Webserver close button seems to do the trick

Regards,
Richard

Rene Simons

  • Hero Member
  • *****
  • Posts: 649
    • View Profile
Re: NT apps not closing from Webserver
« Reply #3 on: June 28, 2018, 12:47:56 PM »
Hi,
It Sometimes happens that you cannot create a new version of the app because it still seems running.
However, when you look into the Task Manager, you cannot find the program there, so you cannot "kill" it.
You can use Microsoft's Process Explorer to find your app and end it.

You can download MPE for free (and legit) from https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer

Cheers,
Rene

Rene Simons
NT14.14