Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-2499

Terminate git processes when HTTP clients disconnect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 1.0.1
    • 1.0
    • Git Hosting
    • None

    Description

      When HTTP clients disconnect while Stash has already spawned git processes, the git processes are not terminated until they timeout (currently set to 30 minutes).

      A bit of debugging uncovered that this is caused by an issue in processutils. When the client disconnects, it triggers an exception when the process tries to write the OutputHandler tries to write to the ServletOutputStream. As a result, the output IO pump finishes, as does the input IO pump. The error stream IO pump however is still running and keeps the process alive.

      The git process continues to write to its standard out, until the buffers fill up and the process just blocks. If this happens during a clone request, the process will sit there and hold on to 100s of MBs of memory for 30 minutes..

      Attachments

        Activity

          People

            mheemskerk Michael Heemskerk (Inactive)
            mheemskerk Michael Heemskerk (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: