Commit a89c874df7e2743f97f232794277b87b49068b8f
1 parent
b4bc3088
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Fix production script
Showing
1 changed file
with
2 additions
and
4 deletions
Show diff stats
script/production
... | ... | @@ -30,7 +30,7 @@ do_start() { |
30 | 30 | clear_cache |
31 | 31 | environments_loop start |
32 | 32 | bundle exec whenever --write-crontab --set 'environment=production' |
33 | - ruby -S bundle exec thin -C config/thin.yml start | |
33 | + RUBY_GC_MALLOC_LIMIT=250000000 RUBY_HEAP_MIN_SLOTS=800000 RUBY_FREE_MIN=32768 ruby -S bundle exec thin -C config/thin.yml start | |
34 | 34 | } |
35 | 35 | |
36 | 36 | do_stop() { |
... | ... | @@ -85,9 +85,7 @@ environments_loop() { |
85 | 85 | } |
86 | 86 | |
87 | 87 | do_running() { |
88 | - pids=$(sed "s/.*/& /" tmp/pids/thin.*.pid | tr -d '\n' 2>/dev/null || true) | |
89 | - # passes if any of $pids exist, fails otherwise | |
90 | - kill -0 $pids > /dev/null 2>&1 | |
88 | + pgrep -u noosfero -f 'thin server' > /dev/null | |
91 | 89 | } |
92 | 90 | |
93 | 91 | case "$ACTION" in | ... | ... |