Skip to content
Snippets Groups Projects
Closed Reduce goroutine creation when cloning repos
  • View options
  • Reduce goroutine creation when cloning repos

  • View options
  • Closed Issue created by Warren Gifford

    Created by: indradhanush

    Currently when we receive requests to clone a new repo we spawn a goroutine and wait until we are allowed to clone based on the number of other concurrent clones happening.

    https://github.com/sourcegraph/sourcegraph/blob/1c9e6f78cc6494318a5e3974975aa996b80e69dc/cmd/gitserver/server/server.go#L1280

    During rebalance operations this leads to a huge spike in go routines which consumes a lot of memory and introduces the danger that the gitserver pod is OOM killed.

    Instead, we should create n goroutines on startup, where n is the number of concurrent clones allowed and add clone requests to an internal queue

    Linked items 0

  • Link items together to show that they're related.

    Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading