Uploaded image for project: 'SR for Bitbucket - Development'
  1. SR for Bitbucket - Development
  2. SRBITB-187

filesize check causes a timeout

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 4.3.8, 4.3.15
    • Fix Version/s: 4.3.17
    • Labels:
      None
    • Sprint:
      Sprint 27 - Ends Jan 24, Sprint 27 - Ends Feb 15
    • Critical Points:
      0.9

      Description

      This is to mainly improve the pagination of changes for large repositories. We should look at partitioning the changes and running on separate threads to get the size of the files. We should do some performance testing with large repositories before making these changes. Its unknown if this will improve or hinder the performance.

      The issue:
      If you push a sufficiently large number of commits to a repository where the Maximum File Size Check pre-receive hook is enabled, it's possible for the hook to take so long to process that Bitbucket Server times out and hangs up on the remote user.

      Clients will see text like that below in their shell (or in SourceTree's details):

      user@host shell ~/directory (BARE:master)
      $ git push
      Counting objects: 97426, done.
      Delta compression using up to 4 threads.
      Compressing objects: 100% (31521/31521), done.
      Writing objects: 100% (97426/97426), 15.17 MiB | 309.00 KiB/s, done.
      Total 97426 (delta 51153), reused 95097 (delta 49392)
      fatal: The remote end hung up unexpectedly
      fatal: The remote end hung up unexpectedly
      

      The Bitbucket app log file may contain an entry like the following, which is repeated until timeout

      2016-12-16 16:30:39,451 DEBUG [threadpool:thread-1] ... SSH - git-receive-pack '/dir/repo.git' c.a.bitbucket.scm.BaseCommand Executed /apps/stash/git/latest/bin/git rev-list --format=%H%x02%P%x02%aN%x02%aE%x02%at%n%B%n%x03END%x04 --ignore-missing --stdin --
      

      Atlassian notes that these sort of messages come from a long-running hook.

      It may be possible to temporarily work around the issue by increasing the bitbucket server timeout, but ideally we'd make this hook execute faster for large pushes.

        Attachments

          Activity

            People

            Assignee:
            amarkham Adam Markham
            Reporter:
            jcarter Jonny Carter
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 days
                2d
                Remaining:
                Remaining Estimate - 2 days
                2d
                Logged:
                Time Spent - Not Specified
                Not Specified