RuntimeError: Circular dependency detected while autoloading constant RepositoryCache
We have big repo (49,023 commits 5,989 branches) in CE 8.5.1 and sometimes after push commits it not shown in "Activity" and web hook not triggered. Centry catch exeption:
Stacktrace (последний вызов серху):
active_support/dependencies.rb:492:in `load_missing_constant'
raise "Circular dependency detected while autoloading constant #{qualified_name}"
active_support/dependencies.rb:184:in `const_missing'
Dependencies.load_missing_constant(from_mod, const_name)
active_support/dependencies.rb:526:in `load_missing_constant'
return parent.const_missing(const_name)
active_support/dependencies.rb:184:in `const_missing'
Dependencies.load_missing_constant(from_mod, const_name)
app/models/repository.rb:779:in `cache'
@cache ||= RepositoryCache.new(path_with_namespace)
app/models/repository.rb:238:in `block in expire_cache'
cache.expire(key)
app/models/repository.rb:237:in `each'
cache_keys.each do |key|
app/models/repository.rb:237:in `expire_cache'
cache_keys.each do |key|
app/services/git_push_service.rb:19:in `execute'
@project.repository.expire_cache(branch_name)
app/workers/post_receive.rb:41:in `block in perform'
GitPushService.new(project, @user, oldrev: oldrev, newrev: newrev, ref: ref).execute
app/workers/post_receive.rb:28:in `each'
changes.each do |change|
app/workers/post_receive.rb:28:in `perform'
changes.each do |change|
sidekiq/processor.rb:150:in `execute_job'
worker.perform(*cloned_args)
sidekiq/processor.rb:132:in `block (2 levels) in process'
execute_job(worker, cloned(job['args'.freeze]))
sidekiq/middleware/chain.rb:127:in `block in invoke'
yield
lib/gitlab/sidekiq_middleware/memory_killer.rb:17:in `call'
yield
sidekiq/middleware/chain.rb:129:in `block in invoke'
chain.shift.call(*args, &traverse_chain)
lib/gitlab/metrics/sidekiq_middleware.rb:11:in `block in call'
trans.run { yield }
lib/gitlab/metrics/transaction.rb:45:in `run'
yield
lib/gitlab/metrics/sidekiq_middleware.rb:11:in `call'
trans.run { yield }
sidekiq/middleware/chain.rb:129:in `block in invoke'
chain.shift.call(*args, &traverse_chain)
sidekiq/middleware/server/active_record.rb:6:in `call'
yield
sidekiq/middleware/chain.rb:129:in `block in invoke'
chain.shift.call(*args, &traverse_chain)
sidekiq/middleware/server/retry_jobs.rb:74:in `call'
yield
sidekiq/middleware/chain.rb:129:in `block in invoke'
chain.shift.call(*args, &traverse_chain)
sidekiq/middleware/server/logging.rb:11:in `block in call'
yield
sidekiq/logging.rb:30:in `with_context'
yield
sidekiq/middleware/server/logging.rb:7:in `call'
Sidekiq::Logging.with_context(log_context(worker, item)) do
sidekiq/middleware/chain.rb:129:in `block in invoke'
chain.shift.call(*args, &traverse_chain)
sidekiq/middleware/chain.rb:132:in `call'
traverse_chain.call
sidekiq/middleware/chain.rb:132:in `invoke'
traverse_chain.call
sidekiq/processor.rb:127:in `block in process'
Sidekiq.server_middleware.invoke(worker, job, queue) do
sidekiq/processor.rb:166:in `stats'
yield
sidekiq/processor.rb:126:in `process'
stats(worker, job, queue) do
sidekiq/processor.rb:79:in `process_one'
process(@job) if @job
sidekiq/processor.rb:67:in `run'
process_one
sidekiq/util.rb:16:in `watchdog'
yield
sidekiq/util.rb:24:in `block in safe_thread'
watchdog(name, &block)