I can’t migrate my DB for the version 3.4.0

Hi,

I’m trying to migrate the DB but it fails with Cannot run migrations because another migration process is currently running.. However, there isn’t any other bundle process running.

mastodon@hostux:~/live$ SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate
rails aborted!
ActiveRecord::ConcurrentMigrationError: 

Cannot run migrations because another migration process is currently running.

/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/migration.rb:1399:in `block in with_advisory_lock'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/migration.rb:1416:in `block in with_advisory_lock_connection'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in `with_connection'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/migration.rb:1416:in `with_advisory_lock_connection'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/migration.rb:1397:in `with_advisory_lock'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/migration.rb:1251:in `migrate'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/chewy-5.2.0/lib/chewy/railtie.rb:37:in `block in migrate'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/chewy-5.2.0/lib/chewy/strategy.rb:70:in `wrap'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/chewy-5.2.0/lib/chewy.rb:201:in `strategy'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/chewy-5.2.0/lib/chewy/railtie.rb:37:in `migrate'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/migration.rb:1086:in `up'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/migration.rb:1061:in `migrate'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/tasks/database_tasks.rb:237:in `migrate'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/strong_migrations-0.7.6/lib/strong_migrations/database_tasks.rb:4:in `migrate'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/railties/databases.rake:92:in `block (3 levels) in <top (required)>'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/railties/databases.rake:90:in `each'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/railties/databases.rake:90:in `block (2 levels) in <top (required)>'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `block in execute'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `each'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `execute'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:199:in `synchronize'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:199:in `invoke_with_call_chain'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:188:in `invoke'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:160:in `invoke_task'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:116:in `each'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:116:in `block in top_level'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:125:in `run_with_threads'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:110:in `top_level'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/rake_module.rb:59:in `with_application'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/command.rb:52:in `invoke'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/commands.rb:18:in `<top (required)>'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.6.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `block in require'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:299:in `load_dependency'
/opt/mastodon/live/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `require'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
Your database collation is susceptible to index corruption.
  (This warning does not indicate that index corruption has occurred and can be ignored)
  (To learn more, visit: https://docs.joinmastodon.org/admin/troubleshooting/index-corruption/)
mastodon@hostux:~/live$ ps aux | grep bundle
mastodon  761473  0.0  0.0   5192   672 pts/0    S+   09:52   0:00 grep --color=auto bundle
mastodon@hostux:~/live$ 

I re-ran it without the services running and I didn’t had this error message, so probably a lock somewhere.

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