Ask Reuben

KEEP_ALIVE

Why has the gwsproxy stopped? 

I have MIN_AVAILABLE set in my Web Services pool but there are no Web Service processes running? 

What does “Disconnected from application server” mean in a web service  vm log file? 

What does “Stopping all DVMs” / “Server stopped due to stop command”  mean in gwsproxy log file

The Web Services pool concept, as configured in the Genero Application Server works quite well to make sure that there is the right number of fglrun processes running to service Web Service requests as they arrive.  It balances the needs of servicing requests quickly without starting too many fglrun processes and consuming user licenses unnecessarily.

One of the simple things to remember is that there will be at least MIN_AVAILABLE number of processes running ready to service requests as they come in.  What confuses some system administrators is that they will look on the server and there are no fglrun web_service_program processes running.  When they check in the gwsproxy log they might see …

Server stopped due to stop command.

… and then they check in the vm log they might see …

Error : -15575
Service stopped
Disconnected from application server.

… (this can vary based on the 4gl code)

What has likely happened is the  result of  another configuration parameter that you need to take into account.  This is KEEP_ALIVE.  What this parameter does is it indicates how long in seconds gwsproxy and the MIN_AVAILABLE number of fglrun processes will sit idle waiting to process the next request.  If no requests arrive in KEEP_ALIVE seconds, then the gwsproxy and fglrun processes will be shut down.

The default as.xcf has a value of 3600 seconds or one hour.  If the web services are 9 to 5 then typically this means that at the end of the business day, gwsproxy and its fglrun processes will be shut down.  If the web services are 7×24 then chances are the gwsproxy and fglrun processes will continue running.

In most cases you want KEEP_ALIVE to be in place.  It helps prevent the gwsproxy and fglrun processes running indefinitely.

There is one scenario were you may want to remove the KEEP_ALIVE parameter.  This where you have some Web Services being used for authentication and you are potentially running very close to your number of User Licenses.  On these authentication web services, if you set START to 1 and MIN_AVAILABLE to 1 and remove KEEP_ALIVE then you should not encounter a scenario where your authentication web service cannot start because you have run out of user licenses!  You will always want these authentication web services running because if they are not, no one can authenticate and start a Genero application!

If you want to do a little demo, with the default as.xcf, set START=2, MIN_AVAILABLE=1, and KEEP_ALIVE=60.  When you start the dispatcher, you should see two instances of the various web services configured in as.xcf start.  There will be two fglrun processes for each web service and a gwsproxy process for each web service.  One fglrun process will stop, and then after 60 seconds you should see the gwsproxy and remaining web service fglrun processes stop.