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

Git operations that consume a huge amount of RAM are not logged

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Git Hosting
    • None
    • 6
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Problem

      Bitbucket nodes under heavy load can be stopped due to running out of system memory. This is caused by forked git operations consuming all available resources.

      There are various ways Git operations can consume a lot of memory. These usually involve repos that are huge in size (10GB or more). git repack and git pack-objects are operations that may potentially consume 10GB, or in extreme cases 40GB of RAM.

      Suggested Solution

      HTTP/SSH requests which forked a git process consuming a huge amount of memory should be logged with a warning message. The log entry should mention the repository involved so an Admin can investigate further. 

      Why this is important

      These log entries help in early detection of issues caused by large repositories. By being aware of repositories consuming a lot of RAM, an Admin can take necessary action such as:

      • Increasing the RAM
      • Adjusting the hosting tickets allocated per node
      • Reducing the frequency or adjusting the schedule by which CI/CD pulls data out of Bitbucket
      • Adding more nodes or setting up mirrors

      Workaround

      • Use ps -ef to monitor running processes
      • Capture the PID of the git process consuming a huge amount of RAM
      • Run pwdx <pid> to get the working directory of the process
      • cat repository-config to get the name of the repository

              Unassigned Unassigned
              aaff5594b3eb Aedrian Escultura
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: