My app notaku-website-produciton
is deployed with a scale of 2, auto_stop_machines = true and min_machines_running = 1
After deployment, when the second machine stops because there is not enough traffic, the proxy tries to send requests to the stopped machine and then fails with could not find a good candidate within 90 attempts at load balancing
:
This are the logs from the stopped machine (bottom messages are the older ones)
2024-06-04 12:05:06.791
[bugsnag] Loaded!
2024-06-04 12:05:06.114
[bugsnag] Bugsnag.start() was called more than once. Ignoring.
2024-06-04 12:04:23.335
[PR04] could not find a good candidate within 90 attempts at load balancing
2024-06-04 12:04:08.710
[PR04] could not find a good candidate within 90 attempts at load balancing
2024-06-04 12:04:05.630
[PR04] could not find a good candidate within 90 attempts at load balancing
2024-06-04 12:03:21.028
[PR04] could not find a good candidate within 90 attempts at load balancing
2024-06-04 12:03:20.604
[PR04] could not find a good candidate within 90 attempts at load balancing
2024-06-04 12:03:17.272
[PR04] could not find a good candidate within 90 attempts at load balancing
2024-06-04 12:03:06.293
[PR04] could not find a good candidate within 90 attempts at load balancing
2024-06-04 12:03:03.610
[PR04] could not find a good candidate within 90 attempts at load balancing
2024-06-04 12:02:36.968
[PR04] could not find a good candidate within 90 attempts at load balancing
2024-06-04 12:01:45.530
SSR /dashboard took 16 ms
2024-06-04 12:01:04.762
SSR /dashboard took 90 ms
2024-06-04 12:00:34.244
[57217.359596] reboot: Restarting system
2024-06-04 12:00:34.243
WARN could not unmount /rootfs: EINVAL: Invalid argument
2024-06-04 12:00:34.239
INFO Starting clean up.
2024-06-04 12:00:34.227
INFO Main child exited with signal (with signal 'SIGTERM', core dumped? false)
2024-06-04 12:00:33.495
INFO Sending signal SIGTERM to main child process w/ PID 314
2024-06-04 12:00:28.499
INFO Sending signal SIGINT to main child process w/ PID 314
As you can see the machine is stopped and then the proxy sends traffic to it anyway.