Repository migrated from BitBucket to GitLab have problems showing branches on UI

Summary

We've successfully migrated repositories from BitBucket to GitLab-CE (on-premisse with HA installation) but some of them are showing errors when we click to list branches on UI. Using git from CMD works as expected but the problem lies listing branches on web UI, all requests result on HTTP error 503.

It's weird because we have other migrated repositories which doesn't show errors like that and work as expected.

GitLab Version: 12.2.1 (fa2d61ef)

Steps to reproduce

0 - Create a group.

1 - Migrate project from BitBucket to GitLab.

2 - Click on link "Branches" or try to list branches in drop-down menu.

3 - 503 Error or "An error occurred while getting projects"

Example Project

N/A

What is the current bug behavior?

Shows an 503 http error.

What is the expected correct behavior?

Should list project brancehes.

Relevant logs and/or screenshots

Error log from /var/log/gitlab/gitlab-rails/production.log:

Started GET "/RECCRED/credit-collection-negotiation-bff/refs?sort=updated_desc&ref=master&search=" for 172.19.64.51 at 2019-09-16 18:23:26 -0300
Processing by ProjectsController#refs as JSON
  Parameters: {"sort"=>"updated_desc", "ref"=>"master", "search"=>"", "namespace_id"=>"RECCRED", "id"=>"credit-collection-negotiation-bff"}

Gitlab::Git::CommandError (13:exit status 128):
  lib/gitlab/git/wraps_gitaly_errors.rb:13:in `rescue in wrapped_gitaly_errors'
  lib/gitlab/git/wraps_gitaly_errors.rb:6:in `wrapped_gitaly_errors'
  lib/gitlab/metrics/instrumentation.rb:161:in `block in wrapped_gitaly_errors'
  lib/gitlab/metrics/method_call.rb:36:in `measure'
  lib/gitlab/metrics/instrumentation.rb:161:in `wrapped_gitaly_errors'
  lib/gitlab/git/repository.rb:122:in `local_branches'
  app/models/repository.rb:736:in `branches_sorted_by'
  lib/gitlab/metrics/instrumentation.rb:161:in `block in branches_sorted_by'
  lib/gitlab/metrics/method_call.rb:36:in `measure'
  lib/gitlab/metrics/instrumentation.rb:161:in `branches_sorted_by'
  app/finders/branches_finder.rb:10:in `execute'
  lib/gitlab/metrics/instrumentation.rb:161:in `block in execute'
  lib/gitlab/metrics/method_call.rb:36:in `measure'
  lib/gitlab/metrics/instrumentation.rb:161:in `execute'
  app/controllers/projects_controller.rb:267:in `refs'
  lib/gitlab/session.rb:11:in `with_session'
  app/controllers/application_controller.rb:450:in `set_session_storage'
  lib/gitlab/i18n.rb:55:in `with_locale'
  lib/gitlab/i18n.rb:61:in `with_user_locale'
  app/controllers/application_controller.rb:444:in `set_locale'
  lib/gitlab/middleware/rails_queue_duration.rb:27:in `call'
  lib/gitlab/metrics/rack_middleware.rb:17:in `block in call'
  lib/gitlab/metrics/transaction.rb:57:in `run'
  lib/gitlab/metrics/rack_middleware.rb:17:in `call'
  lib/gitlab/middleware/multipart.rb:103:in `call'
  lib/gitlab/request_profiler/middleware.rb:17:in `call'
  lib/gitlab/middleware/go.rb:20:in `call'
  lib/gitlab/etag_caching/middleware.rb:13:in `call'
  lib/gitlab/middleware/correlation_id.rb:16:in `block in call'
  lib/gitlab/middleware/correlation_id.rb:15:in `call'
  lib/gitlab/middleware/read_only/controller.rb:40:in `call'
  lib/gitlab/middleware/read_only.rb:18:in `call'
  lib/gitlab/middleware/basic_health_check.rb:25:in `call'
  lib/gitlab/request_context.rb:26:in `call'
  lib/gitlab/metrics/requests_rack_middleware.rb:29:in `call'
  lib/gitlab/middleware/release_env.rb:12:in `call'

Completed 503 Service Unavailable in 67ms (Views: 0.6ms | ActiveRecord: 3.9ms)

Running from git from CMD returns OK:

$ git branch -vv -a
* master                        b3bdbdc [origin/master] Merge pull request #7 in RECCRED/credit-collection-negotiation-bff from development to master
  remotes/origin/HEAD           -> origin/master
  remotes/origin/ajustes_testes a053fba Ajustes nos testes unitarios
  remotes/origin/master         b3bdbdc Merge pull request #7 in RECCRED/credit-collection-negotiation-bff from development to master

Output of checks

N/A

Results of GitLab environment info

N/A

Results of GitLab application Check

N/A

Possible fixes

No fix or workaround was found.

Edited Sep 16, 2019 by Matheus Morais
Assignee Loading
Time tracking Loading