I had one instance of the app (shame on me), running in the australia-southeast1 region yesterday.
Last night was a critical time for the app; people were relying on it working flawlessly, and then halfway through the event, the instance just disappeared. About 8 minutes later, a new instance was created and continued to serve traffic.
Is this something I should expect? Instances randomly disappearing and restarting? I realise I should have had a couple of versions running, but what if both versions restart at the same time?
The logs don't show any errors at the point the app (a standard, simple Rails app) restarts. The logs just have an 8 minute gap, followed by Puma booting up in the new instance.
CPU usage was constant, and rarely above about 5%. Memory usage was around 840MB, with a slight peak of 880MB just before the restart. "Disk Bytes" was a constant ~15KB/sec, with a large spike of 40MB/sec around the time of the restart.
app.yaml
entrypoint: bundle exec rackup -p $PORT
env: flex
runtime: ruby
handlers:
- url: .*
script: main.app
secure: always
automatic_scaling:
min_num_instances: 1
max_num_instances: 4
cpu_utilization:
target_utilization: 0.75