I've got supervisor with a memmon eventlistener from a buildout:

> [supervisor]
> recipe = collective.recipe.supervisor
> user=nfw
> password=nfw
> eggs = supervisor
> programs =
>        10 zeo ${zeo:location}/bin/runzeo ${zeo:location}
>        20 instance ${instance:location}/bin/runzope ${instance:location}  
> true
> plugins =
>       superlance
> eventlisteners =
>       MemmonAll      TICK_60 ${buildout:bin-directory}/memmon [-a 100MB]

It generates a plausible parts/supervisor/supervisord.conf:

> ...
> [program:instance]
> command = /usr/local/cshenton/Projects/cjp/svn-buildout/parts/ 
> instance/bin/runzope
> process_name = instance
> directory = /usr/local/cshenton/Projects/cjp/svn-buildout/parts/ 
> instance
> priority = 20
> redirect_stderr = true
>
> [eventlistener:MemmonAll]
> command = /usr/local/cshenton/Projects/cjp/svn-buildout/bin/memmon - 
> a 100MB
> events = TICK_60
> process_name=MemmonAll
> environment 
> = 
> SUPERVISOR_USERNAME 
> =nfw,SUPERVISOR_PASSWORD=nfw,SUPERVISOR_SERVER_URL=http://localhost:9001

I start up supervisor, and  the plone instance stabilizes at 97MB,  
then after connecting to plone with a browser, jumps to 113MB:

> 2009-10-03 10:30:34,798 INFO spawned: 'MemmonAll' with pid 11608
> 2009-10-03 10:30:34,816 INFO spawned: 'zeo' with pid 11609
> 2009-10-03 10:30:34,826 INFO spawned: 'instance' with pid 11610
> ch...@mackeral:~$ ps -orss 11610
>    RSS
>  97444
> ch...@mackeral:~$ ps -orss 11610
>    RSS
> 113512

But supervisor never restarts the instance. I don't see any info in  
the logs that its checking all processes or anything else.

I'm not sure how to debug it with pdb since supervisor spawns memmon.   
Sticking print and logging statements into superlance/memmon.py  
indicates to me that it never comes back from this wait call:

>     def runforever(self, test=False):
>         while 1:
>             # we explicitly use self.stdin, self.stdout, and  
> self.stderr
>             # instead of sys.* so we can unit test this code
>             headers, payload = childutils.listener.wait(self.stdin,  
> self.stdout)

Any suggestions for debugging this? Thanks.



_______________________________________________
Supervisor-users mailing list
Supervisor-users@lists.supervisord.org
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to