ef-labs / stash-hook-mirror

An Atlassian Stash repository hook for mirroring to one or more remote git repositories.
MIT License
77 stars 58 forks source link

Adding a new mirror for a large repo causes too many git processes #23

Open xaviershay opened 10 years ago

xaviershay commented 10 years ago

To repro:

Result: each push spawns a full push of the repo to the remote. Net effect is massive number of git processes all competing with each other and starving the machine. (We saw CPU saturation and a load average of over 400!) We also concurrency related issues (can't lock refs, etc) due to concurrent git operations.

Expected: pushes to a remote should be serialized, so only one git operation happens at a time.

cc @simoleone

adrianluisgonzalez commented 10 years ago

Definitely makes sense, did you want to create PR? I'm pretty busy on some other projects these days so don't have much bandwidth. I'm not sure when I would be able to get to this.

xaviershay commented 10 years ago

might have a poke it.

This also happens when remote repository is slow, processes stampede over themselves.