I have a instance of edgedb up and running (following these docs), starts and stops correctly when prompted through flyctl. I have set the following params in the fly.toml:
This turns off all machines when not in use, which is fantastic for cost saving as it is only used infrequently. However, when the machine is auto-stopped, it does not re-start again when i attempt to connect via app.internal:8080.
My assumption was that this should happen when a request is made on the app, however this never seems to happen (no machines ever start). DIG resolved the internal URL fine and other fly.io apps are able to connect fine when a machine is actually running.
Any ideas of what is going wrong here?
Hi @growberry! Connecting to a Machine directly over your private network (6PN) won’t be able to automatically start it, unfortunately. Autostart/autostop works only when network traffic is first proxied/load-balanced by our edge proxy, since the proxy is what’s actually responsible for starting and stopping your app’s Machines as needed.
It’s possible to use the proxy for internal services, though! You can configure [[services]] and/or [http_service] as usual in your fly.toml, but then assign the app a private rather than a public IP address. More on that here. Once configured, connect to your app via the private IPv6 address or with the app.flycast domain name. That traffic will then go through the proxy first, and the proxy should autostart your Machines as necessary.