META: Deadline exceeded errors
Clients have the ability to set a deadline on each RPC they perform. To the best of my knowledge only GitLab-Rails does so. If these deadlines are exceeded the request is stopped and the gRPC gem will raise an DeadlineExceeded error. This is a self defense mechanism for Unicorn, as it allows it to continue execution when Gitaly is slow to respond. It's also nice for Gitaly as it can stop execution for an usually slow RPC.
The deadlines have been set a while ago in: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15047, where most of the values were right. Not all however, where a few follow up merge requests were created updating timeouts.
However, there are still issues with the timeouts, and this issue will create a collection of issues with timeouts.
RPC | Issues | Comment |
---|---|---|
FetchSourceBranch | https://gitlab.com/gitlab-org/gitlab-ce/issues/58334 | |
FindAllBranches (merged) | https://gitlab.com/gitlab-org/gitlab-ce/issues/56665 | |
RebaseInProgress | https://gitlab.com/gitlab-org/gitlab-ce/issues/47029 | Possibly stale, or fixed already |
HasLocalBranches | https://gitlab.com/gitlab-org/gitlab-ce/issues/46721 | Do nothing, should be a fast timeout |
CommitDiff | https://gitlab.com/gitlab-org/gitlab-ce/issues/57711 | Medium timeout, might not be enough for large diffs, but will run into unicorn timeout? |
RemoveRemote | https://gitlab.com/gitlab-org/gitlab-ce/issues/56015 | |
FindRemoteRepository | https://gitlab.com/gitlab-org/gitlab-ce/issues/47476 | Performs a request to a remote repository, could be slow |
GetCommitSignatures | https://gitlab.com/gitlab-org/gitlab-ce/issues/58188 |