Last week I followed the functions-with-machines article and got a faas working nicely. Today I updated the code but now when the app tries to shut itself down the system immediately restarts it with this message:
runner[e784921c4dde83] ord [info] machine did not have a restart policy, defaulting to restart
Last week, the app would basically sleep until a new request came in. I can’t find “restart policy” documented anywhere on the fly website. I know restart policy is a Docker thing too (and I am using a Dockerfile), but that’s a
docker run option. Any ideas?
Hey @joshinnorman, we are rolling out a fix for this now. We adjusted the default restart policy earlier today which is causing this.
I just confirmed it’s fixed now. Thanks JP. You all are
@JP_Phillips I’m sure they’re still messing with it, but just fyi - now it’s not waking up for new requests. The request hangs for 60s then the connection is closed. Nothing shows up in the server logs on the Monitoring page.
Gotcha! I’ll take a look at this shortly.
Hey @joshinnorman, we’re looking into this, what’s the id of the app you’re currently running?
edit: got it, investigating!
Is this an id?
How long does the app wait when it’s idle? Did you happen set it so it shuts down after a certain time?
When the app is idle for 10 seconds it exits with
process.exit(0). The fly.toml is:
app = “firm-app-one-off”
internal_port = 8080
force_https = true
dockerfile = “Dockerfile”
Will you try increasing that? It’s probably best to keep it alive for 2+ minutes. I think it may start more reliably.
We’re investigating this one, too. But I don’t think a very quick shutdown period will work well with this infra.
Thanks kurt - I tried 2 minutes but no luck. Same thing. Once it exits, a web request won’t wake it back up.
Hi there! I’ve just deployed some changes that should fix “machines not getting woken up” in your case. A specific combination of settings triggered the bug, they should not be woken up in all cases.
Thanks! For anyone else reading this thread, I’ve confirmed it’s working perfectly now.