LFS objects exist check is too slow when pushing many branches
Zendesk: https://gitlab.zendesk.com/agent/tickets/85897
Customer is on 10.2 and is in the process of migrating many repositories to GitLab. For a handful of large projects the push of all branches/tags fails. Their project was not using LFS. Logs showed that the final /api/v4/internal/allowed
call from GitLab shell was timing out after 60 seconds. strace
of unicorn helped us (actually, @stanhu) narrow this down to the new Gitlab::Checks::ChangeAccess#lfs_object_exist_check
method. This doesn't seem to be performant enough when pushing many branches.
As a validation, we asked the customer to comment out this line and try to push the repositories again. They were able to successfully push at that point.
@stanhu says this is related to gitlab-ee#3429 (Enabling maximum file size limit in repository causes pushes to fail).