Branch creation fail with exception exception 4:Deadline Exceeded

From API and from Web. I am getting the same exception when tries to create a branch.

{“severity”:“ERROR”,“time”:“2020-05-04T14:23:45.002Z”,“correlation_id”:“iYkBouhvy97”,“tags.correlation_id”:“iYkBouhvy97”,“tags.locale”:“en”,“extra.server”:{“os”:{“name”:“Linux”,“version”:"#1 SMP Tue Feb 4 23:02:59 UTC 2020",“build”:“l7.x86_64”,“kernel_version”:“Linux osigitlabdev01 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux”},“runtime”:{“name”:“ruby”,“version”:“ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]”}}," ",“exception.backtrace”:[“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/git/repository.rb:543:in add_branch'","app/models/repository.rb:213:in add_branch’”,“app/services/branches/create_service.rb:12:in execute'","app/controllers/projects/branches_controller.rb:67:in create’”,“ee/lib/gitlab/ip_address_state.rb:10:in with'","ee/app/controllers/ee/application_controller.rb:43:in set_current_ip_address’”,“lib/gitlab/session.rb:11:in with_session'","app/controllers/application_controller.rb:467:in set_session_storage’”,“app/controllers/application_controller.rb:461:in set_locale'","lib/gitlab/application_context.rb:18:in with_context’”,“app/controllers/application_controller.rb:453:in set_current_context'","lib/gitlab/error_tracking.rb:34:in with_context’”,“app/controllers/application_controller.rb:545:in sentry_context'","ee/lib/gitlab/jira/middleware.rb:19:in call’”]}

Hi,

Please share the version and how GitLab is installed/used (gitlab.com or self-hosted, output from https://server.com/help.

How does the API request look like?

Cheers,
Michael

Hi,
Its a self-hosted one with sufficient resources.

GitLab Shell11.0.0
GitLab Workhorsev8.20.0
GitLab APIv4
Ruby2.6.5p114
Rails5.2.3
PostgreSQL10.9

The API i used as below:
gitlab_url + “/api/v4/projects/” + gitlab_p_id + “/repository/branches?branch=” + to_branch + “&ref=” + from_branch

Hi,

that’s missing the GitLab server version unfortunately, is that 12.10.2 or something else?

Cheers,
Michael

The GitLab version is 12.7.5

Hi,

I can see that there is at least 12.7.9 available, and I would generally recommend to upgrade to 12.10.x to eliminate possible bugs in older versions.

Cheers,
Michael

Hi Michael,
Thanks, I will update the GitLab as suggested by you.
After debugging it more I found that I am able to create a branch from master.
But the creation of a branch fails when from_branch is non-master.
Also, I have created a pre-receive hook that checks any that valid JiraId should be part of commit messages.

So couple of questions I have here!!

  1. Do pre-receive hooks call at the time of the creation of a branch?

  2. Is there any way I can view logs if my pre-receive hook is making API calls?

  3. Why error appears when From_branch is non-master.

Hi,

Ah, so you are using hooks which come into play here. Can you share the content?

Does the error persist if you disable/remove these hooks?

Cheers,
Michael