enough with the malloc limit, not needed

This commit is contained in:
Sam 2016-05-25 21:08:48 +10:00
parent 99b95f1fc9
commit a19e43fd3b
6 changed files with 3 additions and 24 deletions

View file

@ -91,7 +91,7 @@ class AdminDashboardData
]
add_problem_check :rails_env_check, :ruby_version_check, :host_names_check,
:gc_checks, :ram_check, :google_oauth2_config_check,
:ram_check, :google_oauth2_config_check,
:facebook_config_check, :twitter_config_check,
:github_config_check, :s3_config_check, :image_magick_check,
:failing_emails_check, :default_logo_check, :contact_email_check,
@ -169,10 +169,6 @@ class AdminDashboardData
I18n.t("dashboard.host_names_warning") if ['localhost', 'production.localhost'].include?(Discourse.current_hostname)
end
def gc_checks
I18n.t("dashboard.gc_warning") if ENV['RUBY_GC_MALLOC_LIMIT'].nil?
end
def sidekiq_check
last_job_performed_at = Jobs.last_job_performed_at
I18n.t('dashboard.sidekiq_warning') if Jobs.queued > 0 and (last_job_performed_at.nil? or last_job_performed_at < 2.minutes.ago)

View file

@ -43,7 +43,7 @@ end
namespace :deploy do
desc 'Start thin servers'
task :start, :roles => :app, :except => { :no_release => true } do
run "cd #{current_path} && RUBY_GC_MALLOC_LIMIT=90000000 bundle exec thin -C config/thin.yml start", :pty => false
run "cd #{current_path} && bundle exec thin -C config/thin.yml start", :pty => false
end
desc 'Stop thin servers'
@ -53,7 +53,7 @@ namespace :deploy do
desc 'Restart thin servers'
task :restart, :roles => :app, :except => { :no_release => true } do
run "cd #{current_path} && RUBY_GC_MALLOC_LIMIT=90000000 bundle exec thin -C config/thin.yml restart"
run "cd #{current_path} && bundle exec thin -C config/thin.yml restart"
end
end

View file

@ -13,7 +13,6 @@ respawn limit 3 30
start on runlevel [2345]
stop on runlevel [06]
env RUBY_GC_MALLOC_LIMIT=90000000
env RAILS_ROOT=/var/www/discourse
env RAILS_ENV=production
env NUM_WEBS=4

View file

@ -23,7 +23,6 @@ exec /bin/bash <<'EOT'
# set HOME to the setuid user's home, there doesn't seem to be a better, portable way
export HOME="$(eval echo ~$(id -un))"
export RAILS_ENV=production
export RUBY_GC_MALLOC_LIMIT=90000000
cd /var/www/discourse

View file

@ -111,7 +111,6 @@ discourse_env_vars = %w(DISCOURSE_DUMP_HEAP RUBY_GC_HEAP_INIT_SLOTS RUBY_GC_HEAP
if @include_env
puts "Running with tuned environment"
ENV["RUBY_GC_MALLOC_LIMIT"] = "50_000_000"
discourse_env_vars - %w(RUBY_GC_MALLOC_LIMIT).each do |v|
ENV.delete v
end

View file

@ -70,20 +70,6 @@ describe AdminDashboardData do
end
end
describe 'gc_checks' do
subject { described_class.new.gc_checks }
it 'returns nil when gc params are set' do
ENV.stubs(:[]).with('RUBY_GC_MALLOC_LIMIT').returns(90000000)
expect(subject).to be_nil
end
it 'returns a string when gc params are not set' do
ENV.stubs(:[]).with('RUBY_GC_MALLOC_LIMIT').returns(nil)
expect(subject).to_not be_nil
end
end
describe 'sidekiq_check' do
subject { described_class.new.sidekiq_check }