Scaling to zero not working

Heya everyone! I’ve just started using Fly and was hoping to use the scale to zero feature. I’ve just logged into Fly after a few days and saw it has been running for 4 days straight! It should have stopped. It looks like its recieving like 3 bytes an hour but still not shutting off, any ideas?

Heres the fly.toml:

# fly.toml app configuration file generated for fabrik-site on 2024-06-14T22:12:53+02:00
# See for information about how to use this file.

app = 'fabrik-site'
primary_region = 'ams'


  internal_port = 3000
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0
  processes = ['app']

  size = 'shared-cpu-1x'

It is a Sveltekit app. It doesn’t have any websockets. I’ve already tried scaling to zero manually and then back to 1 and redeploying entirely.

Hey @Danny1

I can see in the logs that the machine is periodically stopped. You can check the logs for:

App fabrik-site has excess capacity, auto stopping machine …

It’s started back upon receiving a network request. Do you have any kind of uptime monitoring configured that will periodically contact the app?

Heya! Ive not configured any uptime monitoring or similar. I do see these logs, so it is going down periodically.

In addition to this, i can see its going back up after only about 3 mins of downtime

Yep, something is making a request to the app, so our proxy starts the machine back to serve the request.
You can try dumping request headers into the logs. They may contain some information that will help you understand who is making the request.

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