Unhealthy because of failed task

Hello,

I am migrating my Rails app from Heroku.

I cannot figure out what is preventing from successfully deploying
Any idea how I can debug this?

Instance
  ID            = e3907c3d
  Process       = app
  Version       = 1
  Region        = cdg
  Desired       = run
  Status        = failed
  Health Checks = 1 total
  Restarts      = 2
  Created       = 1m26s ago

Events
TIMESTAMP           	TYPE           	MESSAGE
2022-11-22T15:24:50Z	Received       	Task received by client
2022-11-22T15:24:51Z	Task Setup     	Building Task Directory
2022-11-22T15:25:26Z	Started        	Task started by client
2022-11-22T15:25:32Z	Terminated     	Exit Code: 1
2022-11-22T15:25:32Z	Restarting     	Task restarting in 1.001402765s
2022-11-22T15:25:39Z	Started        	Task started by client
2022-11-22T15:25:45Z	Terminated     	Exit Code: 1
2022-11-22T15:25:45Z	Restarting     	Task restarting in 1.116642825s
2022-11-22T15:25:53Z	Started        	Task started by client
2022-11-22T15:25:59Z	Terminated     	Exit Code: 1
2022-11-22T15:25:59Z	Not Restarting 	Exceeded allowed attempts 2 in interval 5m0s and mode is "fail"
2022-11-22T15:25:59Z	Alloc Unhealthy	Unhealthy because of failed task
2022-11-22T15:25:59Z	Killing        	Sent interrupt. Waiting 5s before force killing

Checks
ID                              	SERVICE 	STATE  	OUTPUT
3df2415693844068640885b45074b954	tcp-8080	warning

Recent Logs
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
  2022-11-22T15:25:56Z   [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'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
  2022-11-22T15:25:56Z   [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'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.5/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.5/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.5/lib/rails/commands/rake/rake_command.rb:18:in `perform'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.5/lib/rails/command.rb:50:in `invoke'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.5/lib/rails/commands.rb:18:in `<main>'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
  2022-11-22T15:25:56Z   [info]/app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
  2022-11-22T15:25:56Z   [info]Tasks: TOP => fly:server
  2022-11-22T15:25:56Z   [info](See full trace by running task with --trace)
  2022-11-22T15:25:57Z   [info]Starting clean up.

Rails stack tracebacks sometimes can be very lengthy. I’d recommend that you open two windows, and in one run fly logs and in the other deploy your application. That way you have a chance to catch the real error.

1 Like