Pages migration threads fail sometimes
#<Thread:0x00007f8e9b4cf910 /opt/gitlab/embedded/service/gitlab-rails/app/services/pages/migrate_from_legacy_storage_service.rb:34 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
53: from /opt/gitlab/embedded/service/gitlab-rails/app/services/pages/migrate_from_legacy_storage_service.rb:36:in `block (2 levels) in start_migration_threads'
52: from /opt/gitlab/embedded/service/gitlab-rails/app/services/pages/migrate_from_legacy_storage_service.rb:43:in `process_batch'
51: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/relation/delegation.rb:87:in `each'
50: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:250:in `records'
49: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:626:in `load'
48: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:808:in `exec_queries'
47: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:839:in `skip_query_cache_if_necessary'
46: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:824:in `block in exec_queries'
45: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:743:in `preload_associations'
44: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:743:in `each'
43: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:745:in `block in preload_associations'
42: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:91:in `preload'
41: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:91:in `flat_map'
40: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:91:in `each'
39: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:92:in `block in preload'
38: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:102:in `preloaders_on'
37: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:111:in `preloaders_for_hash'
36: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:111:in `flat_map'
35: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:111:in `each'
34: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:112:in `block in preloaders_for_hash'
33: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:112:in `flat_map'
32: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:112:in `each'
31: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:116:in `block (2 levels) in preloaders_for_hash'
30: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:116:in `flat_map'
29: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:116:in `each'
28: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:117:in `block (3 levels) in preloaders_for_hash'
27: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:104:in `preloaders_on'
26: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:137:in `preloaders_for_one'
25: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:151:in `grouped_records'
24: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:151:in `each'
23: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:153:in `block in grouped_records'
22: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations.rb:237:in `association'
21: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations.rb:237:in `new'
20: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/associations/association.rb:43:in `initialize'
19: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/reflection.rb:476:in `check_validity!'
18: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/reflection.rb:241:in `check_validity_of_inverse!'
17: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/reflection.rb:236:in `inverse_of'
16: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/reflection.rb:381:in `klass'
15: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/reflection.rb:424:in `compute_class'
14: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/inheritance.rb:197:in `compute_type'
13: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/inheritance.rb:197:in `each'
12: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/inheritance.rb:198:in `block in compute_type'
11: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:659:in `safe_constantize'
10: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:628:in `safe_get'
9: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/inflector/methods.rb:325:in `safe_constantize'
8: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/inflector/methods.rb:280:in `constantize'
7: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/inflector/methods.rb:280:in `inject'
6: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/inflector/methods.rb:280:in `each'
5: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/inflector/methods.rb:284:in `block in constantize'
4: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/inflector/methods.rb:284:in `const_get'
3: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:214:in `const_missing'
2: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:581:in `load_missing_constant'
1: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:214:in `const_missing'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:542:in `load_missing_constant': Circular dependency detected while autoloading constant Route (RuntimeError)