Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer (GitLab) <jacob@gitlab.com>2018-03-16 15:12:29 +0300
committerJacob Vosmaer (GitLab) <jacob@gitlab.com>2018-03-16 15:12:29 +0300
commit43ef3608b2ea591dc04220904960832cd3d7aaa2 (patch)
treeefe52853ea934d93fe1337ca2bd022c2123bd0e4
parent1882d71eeabd58894860b6176f51836d5634e8e4 (diff)
Force gitaly-ruby to run Ruby garbage collection
-rw-r--r--CHANGELOG.md2
-rwxr-xr-xruby/bin/gitaly-ruby10
2 files changed, 12 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c1ac74637..9acde24e5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
UNRELEASED
+- Force gitaly-ruby to run Ruby garbage collection
+ https://gitlab.com/gitlab-org/gitaly/merge_requests/631
- Rewrite RepositoryService.HasLocalBranches in Go
https://gitlab.com/gitlab-org/gitaly/merge_requests/629
- Rewrite RepositoryService.MergeBase in Go
diff --git a/ruby/bin/gitaly-ruby b/ruby/bin/gitaly-ruby
index 115e5b6d4..a2ae836bd 100755
--- a/ruby/bin/gitaly-ruby
+++ b/ruby/bin/gitaly-ruby
@@ -43,6 +43,7 @@ def main
trap('TERM') { signal_thread.kill }
start_parent_watcher(ppid_i, signal_thread)
+ start_gc_thread
run_thread = Thread.new do
s.run
@@ -68,4 +69,13 @@ def start_parent_watcher(original_ppid, signal_thread)
end
end
+def start_gc_thread
+ Thread.new do
+ loop do
+ GC.start
+ sleep 60
+ end
+ end
+end
+
main