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