App machines are not restarting after recent deployment

Hello there, 2 of my apps are facing this below issue. The app machines are not restarting. Please see below error logs

2024-05-02T03:16:18Z app[5683461b35368e] sin [info]Tasks: TOP => fly:server => fly:swapfile
2024-05-02T03:16:18Z app[5683461b35368e] sin [info](See full trace by running task with --trace)
2024-05-02T03:16:18Z app[5683461b35368e] sin [info] INFO Main child exited normally with code: 1
2024-05-02T03:16:18Z app[5683461b35368e] sin [info] INFO Starting clean up.
2024-05-02T03:16:18Z app[5683461b35368e] sin [info] WARN could not unmount /rootfs: EINVAL: Invalid argument
2024-05-02T03:16:18Z app[5683461b35368e] sin [info][    3.395840] reboot: Restarting system
2024-05-02T03:16:18Z runner[5683461b35368e] sin [info]machine did not have a restart policy, defaulting to restart
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]fallocate -l 512M /swapfile
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]chmod 0600 /swapfile
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]mkswap /swapfile
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]mkswap: /swapfile: warning: wiping old swap signature.
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]Setting up swapspace version 1, size = 512 MiB (536866816 bytes)
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]no label, UUID=4501d28a-c1a1-4684-8bae-d9f0b69403fd
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]echo 10 > /proc/sys/vm/swappiness
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]swapon /swapfile
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]swapon: /swapfile: swapon failed: Invalid argument
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]rails aborted!
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]Command failed with status (255): [swapon /swapfile...]
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/file_utils.rb:67:in `block in create_shell_runner'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/file_utils.rb:57:in `sh'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/lib/tasks/fly.rake:35:in `block (2 levels) in <main>'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:18:in `perform'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/command.rb:51:in `invoke'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands.rb:18:in `<main>'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]/app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info]Tasks: TOP => fly:server => fly:swapfile
2024-05-02T03:16:19Z app[286507dfe22d18] sin [info](See full trace by running task with --trace)

This has been happening after a recent deployment attempt. I am not sure how to resolve this. Any help is highly appreciated.

Hi,

It might be worth adding a tag to your post of rails (I assume it’s a Rails app) to notify the Rails experts on here. One of them may be able to assist.

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