Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6e9f0809
Commit
6e9f0809
authored
Mar 09, 2021
by
Aleksei Lipniagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable GC compacting via monkey patch
parent
c19699f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
changelogs/unreleased/323555-disable-gc-compacting-via-monkey-patch.yml
...eleased/323555-disable-gc-compacting-via-monkey-patch.yml
+5
-0
config/initializers_before_autoloader/003_gc_compact.rb
config/initializers_before_autoloader/003_gc_compact.rb
+21
-0
No files found.
changelogs/unreleased/323555-disable-gc-compacting-via-monkey-patch.yml
0 → 100644
View file @
6e9f0809
---
title
:
Temporary make `GC.compact` no-op
merge_request
:
56079
author
:
type
:
changed
config/initializers_before_autoloader/003_gc_compact.rb
0 → 100644
View file @
6e9f0809
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
#
# Disables `GC.compact` method via monkey-patching.
# This is temporary measure to deal with reguarly appearing compacting issues (resulting in segfaults) in external gems.
# Having this patch allow using `nakayoshi_fork` in `config/puma.rb`,
# only without `GC.compact` (still invoking 4 GC cycles).
# Refer to for details: https://github.com/puma/puma/blob/80274413b04fae77cac7a7fecab7d6e89204343b/lib/puma/util.rb#L27
module
NakayoshiForkCompacting
module
MonkeyPatch
def
compact
puts
'Note: GC compacting is currently disabled.'
\
' Refer to `config/initializers_before_autoloader/003_gc_compact.rb` for details.'
end
end
end
GC
.
singleton_class
.
prepend
NakayoshiForkCompacting
::
MonkeyPatch
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment