Question
· Oct 10, 2016

Restarting Cache from inside

Dear colleagues,

a recent project came up with the question if it is possible to "restart Cache from inside", ie. using a COS-routine.

Thank you in advance and regdards

Markus

Discussion (5)1
Log in or sign up to continue

Markus,

The application I work with uses a tier configuration of ECP application servers over a Cache mirrored database pair.  The reboot of this tier is handled automatically by Cache classes that break down the reboot into three phases.  Special Linux accounts are called from the classes  via secure shell to handle reboot commands and Cache.  The primary database mirror member handles phase one, basically shutdown process on application servers  and then passes control to the backup member to do phase two.  During phase two, the backup member reboots the primary and returns control back to the original primary for phase three.   During phase three the backup member is rebooted, once completed all application servers are rebooted.  What used to take 45 minutes manually is now done in 16 minutes by Cache

Donnie

If all you're really looking to do is shut down the instance, you can do this with a $zf(-2) callout to the OS to call 'ccontrol stop <instance> quietly restart' (or 'ccontrol stopstart <instance>' if you are on Windows). Do not use $zf(-1) for this, as shutdown would wait for the $zf(-1) calling process until reaching the ShutdownTimeout value. See this doc for an example of using $zf(-2):

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...