I have a rust app that handles transcoding of files that users upload and then subsequently sends SSE progress events while transcoding. Half way through the process, the machine running the transcode process gets automatically suspended:
Config:
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = 'suspend'
auto_start_machines = true
min_machines_running = 0
processes = ['app']
[[vm]]
memory = '4gb'
cpu_kind = 'performance'
cpus = 2
Logs from the machine:
2025-05-12 02:03:15.949
Virtual machine has been suspended
2025-05-12 02:03:07.999
App app-transcoder has excess capacity, autosuspending machine 48e2d60f395548. 1 out of 2 machines left running (region=sjc, process group=app)
2025-05-12T09:03:07.707255Z INFO hls_transcoder::api::handlers::events: Sent progress SSE event for job d5521d5d-7b30-47da-ae2c-0c6d87427da1
2025-05-12T09:03:07.707215Z INFO hls_transcoder::api::handlers::events: Received progress update for job d5521d5d-7b30-47da-ae2c-0c6d87427da1
2025-05-12T09:03:07.638903Z INFO hls_transcoder::job::progress: Job d5521d5d-7b30-47da-ae2c-0c6d87427da1 progress: 35.774063% - transcoding variant 2/3
Obviously I can turn off auto start/stop, but that means running these machines 24/7 and I’d prefer to only run them when needed. However, I can’t understand why this is happening and currently it suspends machines in the midst of user’s transcoding jobs.