Move unicorn_killer to Gemfile#6792
Merged
Conversation
| # Kill unicorn workers really aggressively (at 300mb) | ||
| if defined?(Unicorn) | ||
| use UnicornKiller::Oom, 300 * 1024 | ||
| require 'unicorn/worker_killer' |
There was a problem hiding this comment.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
| # Kill unicorn workers really aggressively (at 300mb) | ||
| if defined?(Unicorn) | ||
| use UnicornKiller::Oom, 300 * 1024 | ||
| require "unicorn/worker_killer" |
Member
There was a problem hiding this comment.
This require should be on top of the file.
Member
There was a problem hiding this comment.
Not necessarily, since the defined?(Unicorn) makes unicorn optional with no changes besides the Gemfile.
Member
There was a problem hiding this comment.
I was more worried about codestyle here - requires in the middle of the code look weird. But if you're fine with it, I can get over it. ;)
Member
There was a problem hiding this comment.
It's not too weird and I mean there's another require just above it still
denschub
added a commit
that referenced
this pull request
May 6, 2016
Move unicorn_killer to Gemfile
Member
|
Merged.
If we do, we can always add that later. :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I stumbled over that and though it is a good idea to use the gem file instead. There are a view changes since 2013.
There is also the possibility to kill workers by max_requests:
Do we need/want this? If so.. unfortunately I have no reference for some max/min values:
I found some examples with 500-600 request per worker.
related to #6269