Hi, is anyone using monit together with Unicorn? I''d like to monitor the Unicorn child processes for memory growth. But monit needs a pid file for each process and since Unicorn only writes a pid file for the master this becomes a bit complicated. I know bluepill and god can handle this but I was wondering if anyone has got this working somehow before I start looking into these. thanks, Florian
El Lunes 08 Marzo 2010, Florian Munz escribi?:> Hi, > > is anyone using monit together with Unicorn? > > I''d like to monitor the Unicorn child processes for memory growth.> But monit needs a pid file for each processWhy do you say that? I use monit to monitorize some forking servers and it takes into accoutn of the child processes. The "trick" is telling monit to inspect the master process pid (that present unde /var/lib/SERVER.pid). -- I?aki Baz Castillo <ibc at aliax.net>
El 08/03/2010, a las 21:31, Florian Munz escribi?:> Hi, > > is anyone using monit together with Unicorn? > > I''d like to monitor the Unicorn child processes for memory growth. But > monit needs a pid file for each process and since Unicorn only writes a > pid file for the master this becomes a bit complicated.I''m using Monit to monitor Unicorn. I use the "totalmem" and "totalcpu" keywords to watch the usage of the master process and all child processes. Previously I used Monit to monitor a bunch of Mongrel servers instead. Those used to stop responding every few days, but I''ve had no failures nor memory problems since switching to Unicorn. Wincent
I?aki Baz Castillo <ibc at aliax.net> wrote:> Why do you say that? I use monit to monitorize some forking servers and it > takes into accoutn of the child processes. The "trick" is telling monit to > inspect the master process pid (that present unde /var/lib/SERVER.pid).Interesting. From the documentation I can''t figure out how you can monitor the children individually though. I can test for the memory of the master process and I can test the memory size of master plus all children. But want I want to do is basically: Sent a QUIT to the child process if its memory size is greater than 300MB. - Florian
El Lunes 08 Marzo 2010, Florian Munz escribi?:> I can test for the memory of the master process and I can test the > memory size of master plus all children. But want I want to do is > basically: Sent a QUIT to the child process if its memory size is > greater than 300MB.Ok, that''s not possible with Monit (AFAIK). Well, you could create a script that stores in some file the Unicorn''s child processes pids, so Monit could inspect them. -- I?aki Baz Castillo <ibc at aliax.net>