NetTalk Central

Author Topic: automatic webserver restart  (Read 3773 times)

AtoB

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Email
automatic webserver restart
« on: November 16, 2016, 01:54:04 PM »
Hi all,

I'm having some problems right now: webserver crashes irregulary and I'm intensively looking for the cause.

but meanwhile : is there some way I could automatically restart the webserver, in case of a crash? Currently the webserver is running as a normal exe, but eventually will run as a service

Thanks in advance,
Ton

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: automatic webserver restart
« Reply #1 on: November 16, 2016, 04:46:28 PM »
there is a nifty app that ships as a selfservice example called connection checker that will restart your app if it is not running. The only prob is that it only works if it shuts down cleanly. GPF reporter will aslo restart the app if it gpf's. But if it just hangs or doesn't shut down properly that can still be a problem.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: automatic webserver restart
« Reply #2 on: November 17, 2016, 06:42:06 AM »
Yes, as long as you are getting an actual GPF, then GPF Reporter can do an automatic restart.
This is certainly the first line of defense.

cheers
Bruce

johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
Re: automatic webserver restart
« Reply #3 on: November 18, 2016, 12:49:24 AM »
Hi Kevin

Can you please provide me the link where i can find the self service connection checker. I aslo have the problem that the service just stop without any errors, no GPF. Just stop.

Tanks
Johan

rainerwallenius

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • Email
Re: automatic webserver restart
« Reply #4 on: November 18, 2016, 03:49:48 AM »
I use a software called Restart on Crash.
It does exactly it's job, checks if the server is responding. If not, stops it if needed and restarts.

:: rainer

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: automatic webserver restart
« Reply #5 on: November 20, 2016, 10:27:45 PM »
Hi Johan,

if you have Capesofts Self Service it is one of the shipping examples

Cheers,

Kevin

AtoB

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Email
Re: automatic webserver restart
« Reply #6 on: November 21, 2016, 11:17:31 AM »
Hi (Kevin)

I've found finally the cause of the "crashing": most likely c10 has problems with threading and the (sql/anywhere) file drivers.

Some questions with regard to the ConnectionChecker:
- is it supposed to have a win32 UI or a web interface? I see a window defined in the "main" procedure, but also a webserver extension and I can access it through the browser, but there is no way I can "save" the properties (for example : the e-mail address). Looking from the code, it tries to save when the window (server) closes, but there is no way for me to nicely close the server (I can't find the console)

- does it work on services too? I guess the used Shellexecute, only works for normal exe's right?

I also tried GPF's reporters feature to "auto restart after GFP" which is a really nice feature i didn't know of (Bruce, next time you add these niceties let me know :-), but in my case the exe not actually gpf's. I seem to have 3 situations:

-  Sometimes it's unresponsive for a while and the exe first returns the crashdump in the errorcode/fileerror() functions, but afterwards dies and becomes totally unresponsive, but there is no gpf signalled (so no restart) and I manually have to kill the process

- Sometimes it does seem to "gpf" but several "messageboxes" with crashdumps open (but I've configured GPFReporter to close quietly and restart automatic) and I have to click on a "close" button first

- Sometimes a little windows messagebox pops up, which only can brings me to Visual Studio when I choose to debug ...

Haven't tried "restart on crash" though ... will investigate tomorrow ...

regards,
Ton




kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: automatic webserver restart
« Reply #7 on: November 22, 2016, 04:09:58 AM »
Hi Ton,

I bring up the win32 window from the taskbar hidden icon menu. As mentioned it only works when the app shuts down cleanly.