|
From: | hcano |
Subject: | Re: Question about check priority |
Date: | Fri, 27 Aug 2021 15:53:46 -0300 |
Hello Guillaume, Yes I can see this is one right now. Process 'unicorn_master_myapp' status OK monitoring status Monitored monitoring mode active on reboot start pid 21645 parent pid 1 uid 1000 effective uid 1000 gid 1000 uptime 1d 2h 37m threads 2 children 3 cpu 0.0% cpu total 19.1% memory 1.1% [175.5 MB] memory total 52.5% [8.0 GB] security attribute unconfined disk read 0 B/s [1.4 MB total] disk write 0 B/s [1.1 GB total] data collected Thu, 26 Aug 2021 16:49:13 Process 'unicorn_myapp_worker0' status OK monitoring status Monitored monitoring mode active on reboot start pid 7017 parent pid 21645 uid 1000 effective uid 1000 gid 1000 uptime 17h 11m threads 3 children 0 cpu 0.6% cpu total 0.6% memory 2.2% [343.0 MB] memory total 2.2% [343.0 MB] security attribute unconfined disk write 0 B/s [15.8 MB total] data collected Thu, 26 Aug 2021 16:49:13 Process 'unicorn_myapp_worker1' status OK monitoring status Monitored monitoring mode active on reboot start pid 5580 parent pid 21645 uid 1000 effective uid 1000 gid 1000 uptime 1d 0h 26m threads 4 children 0 cpu 0.6% cpu total 0.6% memory 2.1% [331.7 MB] memory total 2.1% [331.7 MB] security attribute unconfined disk write 0 B/s [45.3 MB total] data collected Thu, 26 Aug 2021 16:49:13 Looking at logs now : Aug 27 15:27:02 ip-172-31-32-81 monit[10922]: 'unicorn_myapp_worker1' mem amount check succeeded [current mem amount = 190.7 MB] Aug 27 15:27:02 ip-172-31-32-81 monit[10922]: 'unicorn_myapp_worker1' mem amount check succeeded [current mem amount = 190.7 MB] Aug 27 15:36:32 ip-172-31-32-81 monit[10922]: 'unicorn_myapp_worker1' process is not running Aug 27 15:36:32 ip-172-31-32-81 monit[10922]: 'unicorn_myapp_worker1' trying to restart Aug 27 15:36:32 ip-172-31-32-81 monit[10922]: 'unicorn_myapp_worker1' process is not running Aug 27 15:36:32 ip-172-31-32-81 monit[10922]: 'unicorn_myapp_worker1' trying to restart Aug 27 15:36:54 ip-172-31-32-81 monit[10922]: 'unicorn_myapp_worker1' process is running with pid 32304 Aug 27 15:36:54 ip-172-31-32-81 monit[10922]: 'unicorn_myapp_worker1' process is running with pid 32304 Aug 27 17:10:21 ip-172-31-32-81 monit[10922]: 'unicorn_myapp_worker1' mem amount of 358.9 MB matches resource limit [mem amount > 350 MB] Aug 27 17:10:21 ip-172-31-32-81 monit[10922]: 'unicorn_myapp_worker1' exec: '/bin/bash -c /bin/kill -TERM `cat /var/run/service/unicorn_myapp_worker1.pid` && sleep 1' Aug 27 17:10:21 ip-172-31-32-81 monit[10922]: 'unicorn_myapp_worker1' mem amount of 358.9 MB matches resource limit [mem amount > 350 MB] Aug 27 17:10:21 ip-172-31-32-81 monit[10922]: 'unicorn_myapp_worker1' exec: '/bin/bash -c /bin/kill -TERM `cat /var/run/service/unicorn_myapp_worker1.pid` && sleep 1' Aug 27 17:10:51 ip-172-31-32-81 monit[10922]: 'unicorn_myapp_worker1' mem amount check succeeded [current mem amount = 184.5 MB] Aug 27 17:10:51 ip-172-31-32-81 monit[10922]: 'unicorn_myapp_worker1' mem amount check succeeded [current mem amount = 184.5 MB] It looks it is being killed right after matching the limit not respecting the 8 cycles. defined as individually below ``` check process unicorn_master_teachworks with pidfile /var/run/engineyard/unicorn_myapp.pid start program = "/bin/bash -c ‘/service/bin/app_myapp start'" as uid deploy and gid deploy stop program = "/bin/bash -c ‘/service/bin/app_myapp stop'" as uid deploy and gid deploy if mem > 350 MB for 2 cycles then restart —> Is this group directive overwriting the individual one below? if cpu > 100% for 2 cycles then restart group unicorn_myapp check process unicorn_myapp_worker1 with pidfile /var/run/service/unicorn_myapp_worker1.pid if mem > 350.0 MB for 8 cycles then exec "/bin/bash -c '/bin/kill -TERM `cat /var/run/service/unicorn_myapp_worker1.pid` && sleep 1'" group unicorn_myapp ``` Thank You, Carlos Cano
|
[Prev in Thread] | Current Thread | [Next in Thread] |