Wake up machine on ssh connect

App config: 041-tdd-fastapi/server/fly.toml at main · denkasyanov/041-tdd-fastapi · GitHub

My app wakes up when I access it from the browser.
But if it is not running and I’m trying to access the machine via ssh I get

> fly ssh console
Error: app tdd-fastapi has no started VMs.
It may be unhealthy or not have been deployed yet.
Try the following command to verify:

fly status

I visit the app in the browser, repeat the command and access the machine successfully.

Is it possible to wake up a machine on ssh too?

Hi… There isn’t a way to do this all in a single command, that I know of. (It would actually be nice to have fly ssh console --auto-start, :thought_balloon:.)

Issuing a separate fly m start is the usual workaround.

Hope this helps a little!

2 Likes

Added flyctl

Thank you for the response

It seems the best solution in my case would be to disable scale to 0, since I have the tiniest vm for this project.

1 Like

Not directly. Your browser can “wake” a Machine because that’s an explicit capability of our proxy network (it enables Lambda-like workloads). But SSH doesn’t run through our proxy. Use flyctl ssh, and just start your Machine manually with flyctl first. :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.