From a89c874df7e2743f97f232794277b87b49068b8f Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Mon, 13 Apr 2015 16:19:09 -0300 Subject: [PATCH] Fix production script --- script/production | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/script/production b/script/production index e11bc1a..4380f2d 100755 --- a/script/production +++ b/script/production @@ -30,7 +30,7 @@ do_start() { clear_cache environments_loop start bundle exec whenever --write-crontab --set 'environment=production' - ruby -S bundle exec thin -C config/thin.yml start + RUBY_GC_MALLOC_LIMIT=250000000 RUBY_HEAP_MIN_SLOTS=800000 RUBY_FREE_MIN=32768 ruby -S bundle exec thin -C config/thin.yml start } do_stop() { @@ -85,9 +85,7 @@ environments_loop() { } do_running() { - pids=$(sed "s/.*/& /" tmp/pids/thin.*.pid | tr -d '\n' 2>/dev/null || true) - # passes if any of $pids exist, fails otherwise - kill -0 $pids > /dev/null 2>&1 + pgrep -u noosfero -f 'thin server' > /dev/null } case "$ACTION" in -- libgit2 0.21.2