Git push operations extremely slow on Windows

Symptoms

Push operations in Windows environments take above 20 seconds (minutes) to be completed:

[33391ms] - "POST /scm/TEST/foo.git/git-receive-pack HTTP/1.1"
  [203ms] - StashUser com.atlassian.stash.user.UserService.authenticate(String,String,CaptchaResponse)
    [0ms] - InternalStashUser com.atlassian.stash.internal.user.StashUserDao.findByName(String)
    [0ms] - void com.atlassian.stash.internal.user.RepositoryAccessDao.trimToFirstPage(InternalStashUser,int,Predicate)
      [0ms] - boolean com.atlassian.stash.user.PermissionService.hasRepositoryPermission(StashUser,Repository,Permission)
        [0ms] - boolean com.atlassian.stash.internal.user.GrantedPermissionDao.isGrantedToUser(UserPermissionSearchCriteria)
      [0ms] - boolean com.atlassian.stash.user.PermissionService.hasRepositoryPermission(StashUser,Repository,Permission)
...

Cause

Running Stash as a user (either via Windows service or not) that is part of the Administrator group causes Windows to spend a lot of time running permission checks.

atlstash

If you installed Stash as a service using the installer as described on Getting started, you shouldn't be seeing this issue when it is run as a service. A user atlstash is created and responsible for running Stash. This user is not a member of the Administrator group. Please refer to Running the Stash installer for more details on the atlstash user.

Workaround

Run Stash as a local, non-administrator user.

Resolution

If Stash cannot be run as a non-administrator user, apply this hotfix http://support.microsoft.com/kb/2545833.

Last modified on Apr 27, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.