Does App.Quit() in XOJO Cloud kill all instances?

My Web App is acting more as a Service, and I’d like to be able to Stop and Start it w/out logging into the XOJO Cloud UI, but instead do it programatically with a method within the Web App itself.

I’m using App.Quit() right now to force the app to ‘reboot’ (for reasons like changes to config files need to reload, etc.), but if multiple instances of the app have spun up then quitting my instance may not force all instances to quit. Any off-the-shelf built-in functions I should be using?

What you can “instances”? Sessions invoked in multiple places, or your app instantiated more than once serving different IPs/Ports using some scalability feature to serve many people?

All sessions tied to ONE app instance will die, because the App serves all them.

You must terminate all your “Apps” to put your “system” in a inactive state.

I believe OP is asking about Xojo Cloud’s automatic load balancing. I am not Xojo support, so I will leave it for them to answer. For those interested in more control over their apps – including how many load balanced instances are launched, check out Lifeboat.

1 Like

Tim/Rick, yep, I’m referring to when XOJO Cloud spawns multiple instances of the App, meaning I want to Kill and Start all the instances ‘remotely’ where possible. I may have to resort to a poison-pill and having the App(s) make calls to some central resource to get the signal to reboot (since you can’t really quit an app on the cloud, it just respawns another instance). Love XOJO Cloud - and I’m still learning more about it.

1 Like

And only now I see that my “call” ended as a “can”… I’m used to fix myself when I see those things, but many times it is too late and the system do not allow me.

There isn’t a built-in API to do it today (the control panel is of course the supported way).

If there’s nothing that makes sense to put in your code for all instances (like quit every night at X time or whatever)- we may be able to set something up for you like a special file you create that triggers an all-instance restart or something similar, if that’d be useful…

1 Like

Thanks Jason, for confirming that the Control Panel is the sanctioned way to do this. I won’t need anything special done (by XOJO team) to accomplish what I need, but thanks for the offer!

1 Like

That sounds good Bill. Please let me know if you need anything!

1 Like