[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Question about check priority
From: |
hcano |
Subject: |
Question about check priority |
Date: |
Wed, 25 Aug 2021 21:18:37 -0300 |
Hello,
I am using Monit version 5.25.1
My config is:
```
check process unicorn_master_myapp
with pidfile /var/run/services/unicorn_myapp.pid
start program = "/bin/bash -c '/services/bin/app_myapp start'"
as uid deploy and gid deploy
stop program = "/bin/bash -c '/services/bin/app_myapp stop'"
as uid deploy and gid deploy
if mem > 350 MB for 2 cycles then restart
if cpu > 100% for 2 cycles then restart
group unicorn_myapp
check process unicorn_myapp_worker0
with pidfile /var/run/services/unicorn_worker_myapp_0.pid
if mem > 350.0 MB for 8 cycles then exec "/bin/bash -c '/bin/kill -TERM `cat
/var/run/services/unicorn_worker_myapp_0.pid` && sleep 1'"
group unicorn_myapp
check process unicorn_myapp_worker1
with pidfile /var/run/services/unicorn_worker_myapp_1.pid
if mem > 350.0 MB for 8 cycles then exec "/bin/bash -c '/bin/kill -TERM `cat
/var/run/services/unicorn_worker_myapp_1.pid` && sleep 1'"
group unicorn_myapp
```
Unicorn has a master process then each worker has another.
In this case if the master process is above 350MB for 2 cycles it has to be
restarted.
Now the workers has a limit of 8 cycles.
My question is:
I am seeing workers being killed after 2 cycles.
Is it intentional as the check on group unicorn_myapp is in some kind
overwriting the later ones?
What I may be missing?
Thank You,
Carlos Cano
- Question about check priority,
hcano <=