diff --git a/script/production b/script/production index 4380f2d..89a85f2 100755 --- a/script/production +++ b/script/production @@ -55,7 +55,7 @@ do_restart() { environments_loop start clear_cache - ruby -S bundle exec thin -C config/thin.yml restart --onebyone + RUBY_GC_MALLOC_LIMIT=250000000 RUBY_HEAP_MIN_SLOTS=800000 RUBY_FREE_MIN=32768 ruby -S bundle exec thin -C config/thin.yml restart --onebyone } stop_via_pid_file() { @@ -85,7 +85,9 @@ environments_loop() { } do_running() { - pgrep -u noosfero -f 'thin server' > /dev/null + 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 } case "$ACTION" in -- libgit2 0.21.2