thanks for your quick reply chris.
is there any plan to make supervisor capable of monitoring memory usage for a
process and it's subprocesses too?
for me this seems to be a common problem...
i'll ask on varnish list about a possiblity to make varnish not fork a
subprocess, too
regards, fRiSi
just for the record, theses are the other workarounds i tried out which did
not work out for me:
worker threads
--------------
varnish has a "-w" option to define the number of worker threads. passing "-w
0" or "-w 1" resulted in 2 processes again.
user nobody
-----------
the recipe uses nobody as default user. maybe the subprocess is just started
to run varnish with this userid?
so i told supervisor to start varnish as nobody:
programs =
10 zeo ${zeoserver:location}/bin/runzeo ${zeoserver:location} true
20 zope ${instance:location}/bin/runzope ${instance:location} true
30 varnish ${buildout:directory}/bin/varnish true nobody
when starting varnish supervisor just gives an unspecific error.
dev2:~# /etc/init.d/kirche-supervisorctl
MemmonVarnish STARTING
MemmonZope STARTING
varnish BACKOFF Exited too quickly (process log
may have details)
zeo STARTING
zope STARTING
supervisor> start varnish
varnish: ERROR (abnormal termination)
in syslog you'll find the following (don't know what that's about):
Mar 20 09:40:53 dev2 varnishd[24836]: child (24842) Started
Mar 20 09:40:53 dev2 varnishd[24836]: Child (24842) said Closed fds: 4 5 6 9
10 12 13
Mar 20 09:40:53 dev2 varnishd[24836]: Child (24842) said Child starts
Mar 20 09:40:53 dev2 varnishd[24836]: Child (24842) said managed to mmap
524288000 bytes of 524288000
Mar 20 09:40:53 dev2 varnishd[24836]: Child (24842) said Ready
Mar 20 09:42:22 dev2 varnishd[24836]: Manager got SIGINT
Mar 20 09:42:22 dev2 varnishd[24836]: Stopping Child
Am Donnerstag, 19. März 2009 01:19:30 schrieb Chris McDonough:
> Supervisor is only capable of monitoring processes which it runs directly;
> it cannot monitor processes that are forked off by subprocesses. Your
> configuration looks good otherwise. I don't know how to make Varnish not
> fork a subprocess; you might ask on the Varnish list.
>
> Harald Friessnegger wrote:
> > hi there
> >
> > i'm using supervisor for controlling a zope server and varnish cache in a
> > python buildout (this is why some configuration options might look
> > different from what you're used to)
> >
> > monitoring and restarting varnish with memmon does not work out of the
> > box.
> >
> > varnish does not get restarted, since the process really eating memory
> > (pid 13271)
> > is not the one started by supervisor and observerd by MemmonVarnish
> > (13265) (see supervisor and top output below)
> >
> > how can i make Memmon watch vanish sub-processes or varnish not fork any
> > processes?
> >
> >
> > regards, fRiSi
> >
> >
> >
> > # bin/supervisorctl
> > MemmonVarnish RUNNING pid 13261, uptime 1 day, 4:37:05
> > MemmonZope RUNNING pid 13260, uptime 1 day, 4:37:05
> > varnish RUNNING pid 13265, uptime 1 day, 4:37:02
> > zeo RUNNING pid 13262, uptime 1 day, 4:37:04
> > zope RUNNING pid 13263, uptime 1 day, 4:37:03
> >
> > # top
> > ...
> > Mem: 1548288k total, 1540624k used, 7664k free, 2172k
> > buffers Swap: 1048568k total, 767628k used, 280940k free, 171980k
> > cached 13271 nobody 15 0 1864m 771m 90m S 0 51.0 0:14.43
> > varnishd 13263 zope 15 0 635m 454m 3500 S 0 30.1 47:59.16
> > python2.4 13265 root 15 0 98192 81m 80m S 0 5.4 0:00.04
> > varnishd 13262 root 16 0 109m 12m 2772 S 0 0.8 0:50.06
> > python2.4 ...
> >
> >
> >
> >
> >
> > varnish is started by supervisor with these parameters
> >
> > exec ...parts/varnish-build/sbin/varnishd \
> > -f "...etc/varnish.vcl" \
> > -P "...parts/varnish/varnish.pid" \
> > -a localhost:6181 \
> > -T localhost:6182 \
> > -s file,"...parts/varnish/storage",500M \
> > -F \
> > -t 0 "$@"
> >
> >
> > the supervisor section for varnish and memmon-varnish looks like this
> >
> > [program:varnish]
> > command = ...bin/varnish
> > process_name = varnish
> > directory = ...bin
> > priority = 30
> > redirect_stderr = true
> >
> > [eventlistener:MemmonVarnish]
> > command = ...bin/memmon -p varnish=600MB
> > events = TICK_60
> > process_name=MemmonVarnish
> > environment=SUPERVISOR_USERNAME=admin,SUPERVISOR_PASSWORD=admin,SUPERVISO
> >R_SERVER_URL=http://localhost:9001
> >
> >
> >
> >
> >
> >
> > buildout configuration:
> >
> > [varnish]
> > recipe = plone.recipe.varnish:instance
> > daemon = ${buildout:directory}/parts/varnish-build/sbin/varnishd
> > bind = localhost:6181
> > config = ${buildout:directory}/etc/varnish.vcl
> > cache-size = 500M
> > telnet = localhost:6182
> > # foreground is needed for supervisor to control varnish correctly
> > mode = foreground
> >
> >
> > [supervisor]
> > recipe = collective.recipe.supervisor
> > programs =
> > 10 zeo ${zeoserver:location}/bin/runzeo ${zeoserver:location} true
> > 20 zope ${instance:location}/bin/runzope ${instance:location} true
> > 30 varnish ${buildout:directory}/bin/varnish true
> > eventlisteners =
> > MemmonZope TICK_60 ${buildout:bin-directory}/memmon [-p
> > zope=1000MB] MemmonVarnish TICK_60 ${buildout:bin-directory}/memmon [-p
> > varnish=600MB]
--
Webmeisterei GmbH - Büro für Netzfragen
Tel: +43 5572 908877, Fax: +43 5572 908877-66
Steinebach 18, A-6850 Dornbirn
http://www.webmeisterei.com
_______________________________________________
Supervisor-users mailing list
[email protected]
http://lists.supervisord.org/mailman/listinfo/supervisor-users